[PHP] Converting user input for XML-validation

2007-11-16 Thread Ralph Kutschera
Hallo! I'm having an HTML-form where the user can input anything. With PHP I'm processing the input to XML like what the user has entered Now, if the user enters e.g "< thats a bracket", that gives < thats a bracket which of course does not validate. Is there a standard function in PHP to c

Re: [PHP] Converting user input for XML-validation

2007-11-16 Thread Zoltán Németh
2007. 11. 16, péntek keltezéssel 11.14-kor Ralph Kutschera ezt írta: > Hallo! > > I'm having an HTML-form where the user can input anything. With PHP > I'm processing the input to XML like > > what the user has entered > > Now, if the user enters e.g "< thats a bracket", that gives > > < that

Re: [PHP] Converting user input for XML-validation

2007-11-16 Thread Per Jessen
Ralph Kutschera wrote: > Is there a standard function in PHP to convert any string for usage > with XML? In the example the string should become "< thats a > bracket". You could just use CDATA in XML, but otherwise you might want to look at html_entities(). /Per Jessen, Zürich -- PHP General M