Commit 0676cd2a authored by Jérôme Tamarelle's avatar Jérôme Tamarelle

Use the application charset as default charset for `$app->escape()` method.

parent 1d62671c
......@@ -344,9 +344,9 @@ class Application extends \Pimple implements HttpKernelInterface, EventSubscribe
*
* @return string Escaped text
*/
public function escape($text, $flags = ENT_COMPAT, $charset = 'UTF-8', $doubleEncode = true)
public function escape($text, $flags = ENT_COMPAT, $charset = null, $doubleEncode = true)
{
return htmlspecialchars($text, $flags, $charset, $doubleEncode);
return htmlspecialchars($text, $flags, $charset ?: $this['charset'], $doubleEncode);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment