[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
This commit is contained in:
Igor Wiedler 2010-04-24 15:28:50 +02:00 committed by Nils Adermann
parent 0ae7df8a51
commit b3558b5078

View file

@ -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