Customized htmlentities escaping