diff options
author | Igor Wiedler <igor@wiedler.ch> | 2010-04-24 15:28:50 +0200 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2010-09-17 14:03:57 +0200 |
commit | b3558b50786dd8a66e4c4011647c048612bbfa7f (patch) | |
tree | 3d05c5f6895ba9bce5869708b915cb4d63764172 /phpBB/includes/request | |
parent | 0ae7df8a51129f2ece86f959e2e155d988feb081 (diff) | |
download | forums-b3558b50786dd8a66e4c4011647c048612bbfa7f.tar forums-b3558b50786dd8a66e4c4011647c048612bbfa7f.tar.gz forums-b3558b50786dd8a66e4c4011647c048612bbfa7f.tar.bz2 forums-b3558b50786dd8a66e4c4011647c048612bbfa7f.tar.xz forums-b3558b50786dd8a66e4c4011647c048612bbfa7f.zip |
[feature/request-class] Automatically normalize multibyte data in request_var
To save users from having to run everything through
utf8_normalize_nfc(), a call is done automatically from within set_var,
which is called by request_var.
PHPBB3-9716
Diffstat (limited to 'phpBB/includes/request')
-rw-r--r-- | phpBB/includes/request/type_cast_helper.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/phpBB/includes/request/type_cast_helper.php b/phpBB/includes/request/type_cast_helper.php index ff392fbf8f..7b8aacc5a9 100644 --- a/phpBB/includes/request/type_cast_helper.php +++ b/phpBB/includes/request/type_cast_helper.php @@ -103,6 +103,11 @@ class phpbb_type_cast_helper implements phpbb_type_cast_helper_interface { $result = trim(htmlspecialchars(str_replace(array("\r\n", "\r", "\0"), array("\n", "\n", ''), $result), ENT_COMPAT, 'UTF-8')); + if ($multibyte) + { + $result = utf8_normalize_nfc($result); + } + if (!empty($result)) { // Make sure multibyte characters are wellformed |