1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-01 14:30:32 +02:00

[feature/request-class] Make server() use the $html_encode parameter

$request->server() should not auto html-escape values. header() however should.
Also introduce some tests for this behaviour.

Thanks to nn- for catching this.

PHPBB3-9716
This commit is contained in:
Igor Wiedler
2011-08-06 19:47:12 +02:00
parent d1a0dfbafb
commit 24e9fb24d1
2 changed files with 46 additions and 2 deletions

View File

@@ -261,12 +261,12 @@ class phpbb_request implements phpbb_request_interface
if ($this->is_set($var_name, phpbb_request_interface::SERVER))
{
return $this->variable($var_name, $default, $multibyte, phpbb_request_interface::SERVER);
return $this->variable($var_name, $default, $multibyte, phpbb_request_interface::SERVER, $html_encode);
}
else
{
$var = getenv($var_name);
$this->type_cast_helper->recursive_set_var($var, $default, $multibyte);
$this->type_cast_helper->recursive_set_var($var, $default, $multibyte, $html_encode);
return $var;
}
}