From 64f1e408fa2123b62910e6804a6d7067dcef58b5 Mon Sep 17 00:00:00 2001 From: Jenny Gray Date: Wed, 13 Oct 2010 14:08:02 +0000 Subject: [PATCH] MDL-24565 control characters stripped so xml output functions correctly now without unicode regular expression --- lib/weblib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/weblib.php b/lib/weblib.php index 0e6737e52a4..fd97d26f6af 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -1299,7 +1299,7 @@ function wikify_links($string) { function fix_non_standard_entities($string) { $text = preg_replace('/�*([0-9]+);?/', '&#$1;', $string); $text = preg_replace('/�*([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; }