mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-04 22:47:21 +00:00
Clarify documentation for escape filter
It was somewhat unclear from the documentation what the intended purpose of the 'js' escape strategy is.
This commit is contained in:
@@ -42,7 +42,9 @@ documents:
|
||||
* ``html``: escapes a string for the **HTML body** context,
|
||||
or for HTML attributes values **inside quotes**.
|
||||
|
||||
* ``js``: escapes a string for the **JavaScript** context.
|
||||
* ``js``: escapes a string for the **JavaScript** context. This is intended for
|
||||
use in JavaScript or JSON strings, and encodes values using backslash escape
|
||||
sequences.
|
||||
|
||||
* ``css``: escapes a string for the **CSS** context. CSS escaping can be
|
||||
applied to any string being inserted into CSS and escapes everything except
|
||||
|
||||
Reference in New Issue
Block a user