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
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
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
3 matches
Mail list logo