mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02: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
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue