xml rules



I'm writing a bit of XML (wimpy player playlist), well PHP is...

I know there are a handful of characters that need to be escaped. Is there a php function suited to that? htmlentities?

Or should I just do these:

" -> "
' -> '
< -> &lt;
> -> &gt;
& -> &amp;

Jeff
.



Relevant Pages

  • Re: [PHP] Preventing SQL Injection/ Cross Site Scripting
    ... It's a shame that so many PHP installations have them enabled, and a huge disappointment that PHP is actually distributed with this stuff enabled! ... encoding data for output to an HTML document. ... characters into 5, 6, or 7-byte strings, if you already provided the correct character set in the Content-Type HTTP header. ... For anything that gets written to a database or used for a query, I suggest escaping the data using a function specifically designed for that database. ...
    (php.general)
  • Re: [PHP] Preventing SQL Injection/ Cross Site Scripting
    ... It's a shame that so many PHP ... encoding data for output to an HTML document. ... characters into 5, 6, or 7-byte strings, if you already provided the ... anything that gets written to a database or used for a query, ...
    (php.general)
  • Re: refactor + help
    ... I'm was messing around with PHP today and I wrote a tiny app that asks ... If your zipcode is less than 5 characters, ... it asks you too enter a zip code with the proper amount of characters. ... the page is sent to the client. ...
    (comp.lang.php)
  • Re: refactor + help
    ... I'm was messing around with PHP today and I wrote a tiny app that asks ... If your zipcode is less than 5 characters, ... it asks you too enter a zip code with the proper amount of characters. ... the page is sent to the client. ...
    (comp.lang.php)
  • Re: refactor + help
    ... I'm was messing around with PHP today and I wrote a tiny app that asks ... it asks you too enter a zip code with the proper amount of characters. ... I cannot figure out how to have the the 'invalid amount of characters' ... the page is sent to the client. ...
    (comp.lang.php)