ProblemHelpPlease Posted March 10, 2009 Share Posted March 10, 2009 I am using the following code but am not getting the expected results. $message = htmlentities($message); if $message contains !£$%^&*() before i run the functionthen after i run the function it returns !£$%^&*()As far as i am aware the htmlentities function should convert all the charaters to html entitiesAny ideas? Link to comment Share on other sites More sharing options...
justsomeguy Posted March 10, 2009 Share Posted March 10, 2009 htmlentities converts all characters that have entity codes. Those other characters don't have entity codes. You can get a list of them here:http://www.lookuptables.com/It's the leftmost column in the table. Link to comment Share on other sites More sharing options...
ProblemHelpPlease Posted March 10, 2009 Author Share Posted March 10, 2009 I was taking my html entities from http://www.w3schools.com/tags/ref_entities.aspI don't get the link you sent me, it looks like all the items have entity codes.What am I missing? Link to comment Share on other sites More sharing options...
justsomeguy Posted March 10, 2009 Share Posted March 10, 2009 It doesn't convert to numbered entities, it converts to named entities. Those characters have numbered entities, but not named. There's no reason to have an entity for most of those characters, they won't break anything being there. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.