Classes Mage_Core_Block_Abstract
and Mage_Core_Helper_Abstract
both use the same function Mage_Core_Helper_Abstract::escapeHtml
thatand it's implementation internaly uses PHP htmlspecialchars function besides implementing some aditional logic for arrays with HTML content.
The function can be accessed in all block and helper classes through $this and since the function is public you can use it through Mage::helper( 'core' ), or some other helper class, everywhere else.