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:
6b3e399
)
MDL-24282 improved s() to deal better with hex encoded entities
author
Petr Skoda
<skodak@moodle.org>
Sun, 19 Sep 2010 15:27:00 +0000
(15:27 +0000)
committer
Petr Skoda
<skodak@moodle.org>
Sun, 19 Sep 2010 15:27:00 +0000
(15:27 +0000)
lib/weblib.php
patch
|
blob
|
blame
|
history
diff --git
a/lib/weblib.php
b/lib/weblib.php
index
2656885
..
aaabf20
100644
(file)
--- a/
lib/weblib.php
+++ b/
lib/weblib.php
@@
-121,7
+121,7
@@
function s($var, $obsolete = false) {
return '0';
}
- return preg_replace("/&
(#\d+);/i", "&$1;", htmlspecialchars($var
));
+ return preg_replace("/&
#(\d+|x[0-7a-fA-F]+);/i", "&#$1;", htmlspecialchars($var, ENT_QUOTES, 'UTF-8', false
));
}
/**