From cb6a4f09ee0a5e7e1070bff070264b15911ee638 Mon Sep 17 00:00:00 2001
From: skodak <skodak>
Date: Thu, 22 Mar 2007 16:37:55 +0000
Subject: [PATCH] MDL-9007 weblib.php breaks upper-case hex Numeric Character
 References; patch by Gareth Morgan; merged from MOODLE_18_STABLE

---
 lib/weblib.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/weblib.php b/lib/weblib.php
index 39a1d35a71..2e3451afbc 100644
--- a/lib/weblib.php
+++ b/lib/weblib.php
@@ -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);
-- 
2.39.5