Permalink
Browse files

MDL-24565 control characters stripped so xml output functions correctly

now without unicode regular expression
  • Loading branch information...
1 parent daff57f commit 64f1e408fa2123b62910e6804a6d7067dcef58b5 @jennymgray jennymgray committed Oct 13, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/weblib.php
View
2 lib/weblib.php
@@ -1299,7 +1299,7 @@ function wikify_links($string) {
function fix_non_standard_entities($string) {
$text = preg_replace('/&#0*([0-9]+);?/', '&#$1;', $string);
$text = preg_replace('/&#x0*([0-9a-fA-F]+);?/', '&#x$1;', $text);
- $text = preg_replace('/\p{Cc}/u', ' ', $text);
+ $text = preg_replace('[\x00-\x08\x0b-\x0c\x0e-\x1f]', '', $text);
return $text;
}

0 comments on commit 64f1e40

Please sign in to comment.