You are here

protected property Twig_Test_EscapingTest::$urlSpecialChars in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/twig/twig/test/Twig/Tests/escapingTest.php \Twig_Test_EscapingTest::urlSpecialChars

File

vendor/twig/twig/test/Twig/Tests/escapingTest.php, line 81

Class

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

Code

protected $urlSpecialChars = array(
  /* HTML special chars - escape without exception to percent encoding */
  '<' => '%3C',
  '>' => '%3E',
  '\'' => '%27',
  '"' => '%22',
  '&' => '%26',
  /* Characters beyond ASCII value 255 to hex sequence */
  'Ā' => '%C4%80',
  /* Punctuation and unreserved check */
  ',' => '%2C',
  '.' => '.',
  '_' => '_',
  '-' => '-',
  ':' => '%3A',
  ';' => '%3B',
  '!' => '%21',
  /* Basic alnums excluded */
  'a' => 'a',
  'A' => 'A',
  'z' => 'z',
  'Z' => 'Z',
  '0' => '0',
  '9' => '9',
  /* Basic control characters and null */
  "\r" => '%0D',
  "\n" => '%0A',
  "\t" => '%09',
  "\0" => '%00',
  /* PHP quirks from the past */
  ' ' => '%20',
  '~' => '~',
  '+' => '%2B',
);