View Single Post
Old 26-06-2007, 13:17   #3 (permalink)
Bill Posters
trouble free and loverlee
 
Join Date: Mar 2003
Location: YooKay
Posts: 2,875
Simple, but I found it useful when htmlspecialchars() and htmlentities() weren't doing the trick in an entirely utf-8, multi-lingual XML file:

PHP Code:
function xmlspecialchars($str) {

    return 
str_replace(''',''',htmlspecialchars($str,ENT_QUOTES,'UTF-8'));



Probably flawed, but worked for me when I needed it.
  Reply With Quote