MDL-21026 improved entity handling
This commit is contained in:
+2
-2
@@ -1149,8 +1149,8 @@ function wikify_links($string) {
|
||||
* @return string
|
||||
*/
|
||||
function fix_non_standard_entities($string) {
|
||||
$text = preg_replace('/(&#[0-9]+)(;?)/', '$1;', $string);
|
||||
$text = preg_replace('/(&#x[0-9a-fA-F]+)(;?)/', '$1;', $text);
|
||||
$text = preg_replace('/�*([0-9]+);?/', '&#$1;', $string);
|
||||
$text = preg_replace('/�*([0-9a-fA-F]+);?/', '&#x$1;', $text);
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user