Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
daff57f
)
MDL-24565 control characters stripped so xml output functions correctly
author
Jenny Gray
<j.m.gray@open.ac.uk>
Wed, 13 Oct 2010 14:08:02 +0000
(14:08 +0000)
committer
Jenny Gray
<j.m.gray@open.ac.uk>
Wed, 13 Oct 2010 14:08:02 +0000
(14:08 +0000)
now without unicode regular expression
lib/weblib.php
patch
|
blob
|
blame
|
history
diff --git
a/lib/weblib.php
b/lib/weblib.php
index
0e6737e
..
fd97d26
100644
(file)
--- a/
lib/weblib.php
+++ b/
lib/weblib.php
@@
-1299,7
+1299,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);
+ $text = preg_replace('
[\x00-\x08\x0b-\x0c\x0e-\x1f]', '
', $text);
return $text;
}