X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Ftwig%2Ftwig%2Ftest%2FTwig%2FTests%2FescapingTest.php;h=80a108ab34390963bdb18e1f6374b6fcf1a17dcd;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=9b98dddcf132379501969c06079524207e83059a;hpb=74df008bdbb3a11eeea356744f39b802369bda3c;p=yaffs-website diff --git a/vendor/twig/twig/test/Twig/Tests/escapingTest.php b/vendor/twig/twig/test/Twig/Tests/escapingTest.php index 9b98dddcf..80a108ab3 100644 --- a/vendor/twig/twig/test/Twig/Tests/escapingTest.php +++ b/vendor/twig/twig/test/Twig/Tests/escapingTest.php @@ -3,8 +3,8 @@ /** * This class is adapted from code coming from Zend Framework. * - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (https://www.zend.com) + * @license https://framework.zend.com/license/new-bsd New BSD License */ class Twig_Test_EscapingTest extends \PHPUnit\Framework\TestCase { @@ -51,13 +51,15 @@ class Twig_Test_EscapingTest extends \PHPUnit\Framework\TestCase protected $jsSpecialChars = array( /* HTML special chars - escape without exception to hex */ - '<' => '\\x3C', - '>' => '\\x3E', - '\'' => '\\x27', - '"' => '\\x22', - '&' => '\\x26', + '<' => '\\u003C', + '>' => '\\u003E', + '\'' => '\\u0027', + '"' => '\\u0022', + '&' => '\\u0026', + '/' => '\\/', /* Characters beyond ASCII value 255 to unicode escape */ 'Ā' => '\\u0100', + '😀' => '\\uD83D\\uDE00', /* Immune chars excluded */ ',' => ',', '.' => '.', @@ -70,12 +72,14 @@ class Twig_Test_EscapingTest extends \PHPUnit\Framework\TestCase '0' => '0', '9' => '9', /* Basic control characters and null */ - "\r" => '\\x0D', - "\n" => '\\x0A', - "\t" => '\\x09', - "\0" => '\\x00', + "\r" => '\r', + "\n" => '\n', + "\x08" => '\b', + "\t" => '\t', + "\x0C" => '\f', + "\0" => '\\u0000', /* Encode spaces for quoteless attribute protection */ - ' ' => '\\x20', + ' ' => '\\u0020', ); protected $urlSpecialChars = array(