joined:Mar 20, 2008
I'm trying to find a tried and tested method of adding user generated text into XML. An example would be a user types some text into a text area, posts it to a php page, then I check the text for html characters and add it to the XML.
My issue, is that the XML is breaking because some non allowed characters are getting through. I have tried:
- strip_tags - to remove html[/li]
- htmlspecialchars - to convert non xml approved characters to acceptable character[/li]
I would like to ideally keep the html in the text if possible. Does anyone have a good method of processing text for addition to XML?