Add htmlentities function