public function TestExtension::nl2br

nl2br only, for testing filters with pre_escape

1 call to TestExtension::nl2br()
TestExtension::escape_and_nl2br in drupal/core/vendor/twig/twig/test/Twig/Tests/integrationTest.php
nl2br which also escapes, for testing escaper filters

File

drupal/core/vendor/twig/twig/test/Twig/Tests/integrationTest.php, line 286

Class

TestExtension

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);
}