eyeh8u (eyeh8u) wrote in php,
eyeh8u
eyeh8u
php

XML Encoding

I'm writing a lib to produce RSS/Atom feeds for a site.

I have the character “ in some stories.

I have done htmlspecialchars($title), however, this still produces a character that feedvalidator.com don't like in the XML.

How should I correctly trap/encode this (and other similar) characters?
Subscribe
  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 4 comments