RsD0p9BK
10/29/2014 - 9:53 AM

replace_nbsp.php

// PHP Parsing Problem with  
$str = str_ireplace([" ", "\xc2\xa0"], " ", $str);

//How to replace/escape U+2028 or U+2029 characters in PHP to stop my JSONP API breaking
$str = str_replace("\xe2\x80\xa8", '\\u2028', $str);

// http://stackoverflow.com/questions/4515117/php-parsing-problem-nbsp-and-%C3%82
// http://stackoverflow.com/questions/14179377/how-to-replace-escape-u2028-or-u2029-characters-in-php-to-stop-my-jsonp-api-br