From b3558b50786dd8a66e4c4011647c048612bbfa7f Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Sat, 24 Apr 2010 15:28:50 +0200 Subject: [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 --- phpBB/includes/request/type_cast_helper.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'phpBB/includes/request') 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 -- cgit v1.2.1