diff options
| author | Savetheinternet <savetheinternet@tinyboard.org> | 2011-11-17 01:22:25 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@tinyboard.org> | 2011-11-17 01:22:25 +1100 |
| commit | 4a03c4c3cd6216405db69e3582df9ebf8809f057 (patch) | |
| tree | 328a8c16663a3e519f8bb85d12b2c6db37d0944b /inc/functions.php | |
| parent | f6f1ecd2dfe227c7214d7405b793c2a697e6c548 (diff) | |
XSS/bug with last commit to utf8tohtml().
Diffstat (limited to 'inc/functions.php')
| -rw-r--r-- | inc/functions.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/functions.php b/inc/functions.php index caaa6894..4a0258c6 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1339,7 +1339,7 @@ } function utf8tohtml($utf8) { - return mb_encode_numericentity($utf8, Array(0xff, 0xffff, 0, 0xffff), 'UTF-8'); + return mb_encode_numericentity(htmlspecialchars($utf8, ENT_NOQUOTES, 'UTF-8'), Array(0xff, 0xffff, 0, 0xffff), 'UTF-8'); } function buildThread($id, $return=false, $mod=false) { |
