Added a function to escape translations with htmlentities in the core_tpl_compiler