Replaced usage of htmlentities with dol_htmlentities