I have written a php program that generates rss feeds, however I am having difficulties with it because of special characters found in the text that is being populated in the feed. Is there a way to easily remove these special characters (like the & symbol) or is there another library that performs the same rss generating function?
I have written a php program that generates rss feeds, however I am having
Share
Why not just sanitise the posts from the database before putting them in the feed?
You can easily use php’s inbuilt
html_entities()function.eg:
Now
$sanitisedequals “This%20came%20from%20the%20database%20and%20contains%20nasty%20characters%20like%20%26!” which should display fine in any rss reader.