mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-30 20:16:45 +00:00
ae2d59da0509d6b8a4d838d5e289600a97b0901f
This PR was submitted for the 2.x branch but it was merged into the 1.x branch instead (closes #2427).
Discussion
----------
Fixed JS escaping for unicode characters with higher code points
Unicode characters with higher code points were being escaped incorrectly. When these characters are escaped, they should maintain their surrogate halves. Previously, Twig was dropping the first surrogate half.
https://mathiasbynens.be/notes/javascript-escapes#unicode-code-point
> The tetragram for centre symbol (𝌆) has code point U+1D306, so you could write it as \u{1D306}. For comparison, if you were to use simple Unicode escapes to represent this symbol, you’d have to write out the surrogate halves separately: '\uD834\uDF06'.
Commits
-------
7f913495 Fixed JS escaping for unicode characters with higher code points
…
Twig, the flexible, fast, and secure template language for PHP ============================================================== Twig is a template language for PHP, released under the new BSD license (code and documentation). Twig uses a syntax similar to the Django and Jinja template languages which inspired the Twig runtime environment. More Information ---------------- Read the `documentation`_ for more information. .. _documentation: http://twig.sensiolabs.org/documentation
Description
Languages
PHP
99.9%