public function TwigTestExtension::nl2br in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/twig/twig/test/Twig/Tests/IntegrationTest.php \TwigTestExtension::nl2br()
nl2br only, for testing filters with pre_escape.
1 call to TwigTestExtension::nl2br()
- TwigTestExtension::escape_and_nl2br in vendor/
twig/ twig/ test/ Twig/ Tests/ IntegrationTest.php - nl2br which also escapes, for testing escaper filters.
File
- vendor/
twig/ twig/ test/ Twig/ Tests/ IntegrationTest.php, line 188
Class
Code
public function nl2br($value, $sep = '<br />') {
// not secure if $value contains html tags (not only entities)
// don't use
return str_replace("\n", "{$sep}\n", $value);
}