Add ability to specify the $type argument to htmlentities()