diff --git a/src/Symfony/Components/OutputEscaper/Escaper.php b/src/Symfony/Components/OutputEscaper/Escaper.php index 19d0440a36..44b879df12 100644 --- a/src/Symfony/Components/OutputEscaper/Escaper.php +++ b/src/Symfony/Components/OutputEscaper/Escaper.php @@ -348,7 +348,10 @@ abstract class Escaper * @param string $value the value to escape * @return string the escaped value */ - function ($value) { return $value; }, + function ($value) + { + return $value; + }, 'js' => /** @@ -363,7 +366,10 @@ abstract class Escaper * @param string $value the value to escape * @return string the escaped value */ - function ($value) { return str_replace(array("\\" , "\n" , "\r" , "\"" , "'" ), array("\\\\", "\\n" , "\\r", "\\\"", "\\'"), (is_string($value) ? htmlentities($value, ENT_QUOTES, Escaper::getCharset()) : $value)); }, + function ($value) + { + return str_replace(array("\\" , "\n" , "\r" , "\"" , "'" ), array("\\\\", "\\n" , "\\r", "\\\"", "\\'"), (is_string($value) ? htmlentities($value, ENT_QUOTES, Escaper::getCharset()) : $value)); + }, 'js_no_entities' => /** @@ -373,7 +379,10 @@ abstract class Escaper * @param string $value the value to escape * @return string the escaped value */ - function ($value) { return str_replace(array("\\" , "\n" , "\r" , "\"" , "'" ), array("\\\\", "\\n" , "\\r", "\\\"", "\\'"), $value); }, + function ($value) + { + return str_replace(array("\\" , "\n" , "\r" , "\"" , "'" ), array("\\\\", "\\n" , "\\r", "\\\"", "\\'"), $value); + }, ); } }