0

I'm trying to write a xml rss feed but noticed I'm getting problems with £ & etc...

Does anybody have a php function to strip / replace all bad characters?

Cheers

Shane
  • 1,603
  • 4
  • 26
  • 54
  • What kind of problems? Those are probably encoding issues that have a better solution than stripping the offending characters. Show some code and examples of what goes wrong how – Pekka Mar 30 '11 at 17:35
  • 1
    You should not have any problems with those characters when you are using any of the dedicated XML libraries because those will escape characters depending on their context. Also make sure you use UTF-8. See http://stackoverflow.com/questions/188414/best-xml-parser-for-php/3616044#3616044. – Gordon Mar 30 '11 at 17:36
  • Actually think been on bit of a redherring... Seems to be ok in firefox - it's ie9, moaning about Whitespace is not allowed at this location. – Shane Mar 30 '11 at 18:37

1 Answers1

0

Found a bug in the code - sorted!

Shane
  • 1,603
  • 4
  • 26
  • 54