]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-9007 weblib.php breaks upper-case hex Numeric Character References; patch by...
authorskodak <skodak>
Thu, 22 Mar 2007 16:37:55 +0000 (16:37 +0000)
committerskodak <skodak>
Thu, 22 Mar 2007 16:37:55 +0000 (16:37 +0000)
lib/weblib.php

index 39a1d35a7142ff8ee189eb7538bb24fe47bdc4a7..2e3451afbc32aedc5777a2296e0b9feeca263841 100644 (file)
@@ -1396,7 +1396,7 @@ function format_string ($string, $striplinks=true, $courseid=NULL ) {
     }
 
     // First replace all ampersands not followed by html entity code
-    $string = preg_replace("/\&(?![a-z0-9#]{1,8};)/", "&amp;", $string);
+    $string = preg_replace("/\&(?![a-zA-Z0-9#]{1,8};)/", "&amp;", $string);
 
     if (!empty($CFG->filterall)) {
         $string = filter_string($string, $courseid);