mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-24565 fix invalid XML unicode characters when uses KSES filtering - credit goes to Jenny Gray
This commit is contained in:
parent
a4e56bf335
commit
6663b9d1e3
@ -1298,6 +1298,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);
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user