protected property Twig_Test_EscapingTest::$jsSpecialChars

File

drupal/core/vendor/twig/twig/test/Twig/Tests/escapingTest.php, line 53

Class

Twig_Test_EscapingTest
This class is adapted from code coming from Zend Framework.

Code

protected $jsSpecialChars = array(
  /* HTML special chars - escape without exception to hex */
  '<' => '\\x3C',
  '>' => '\\x3E',
  '\'' => '\\x27',
  '"' => '\\x22',
  '&' => '\\x26',
  /* Characters beyond ASCII value 255 to unicode escape */
  'Ā' => '\\u0100',
  /* Immune chars excluded */
  ',' => ',',
  '.' => '.',
  '_' => '_',
  /* Basic alnums excluded */
  'a' => 'a',
  'A' => 'A',
  'z' => 'z',
  'Z' => 'Z',
  '0' => '0',
  '9' => '9',
  /* Basic control characters and null */
  "\r" => '\\x0D',
  "\n" => '\\x0A',
  "\t" => '\\x09',
  "\0" => '\\x00',
  /* Encode spaces for quoteless attribute protection */
  ' ' => '\\x20',
);