-
Notifications
You must be signed in to change notification settings - Fork 715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvement of auto-escaping #1030
Conversation
…' modifier; add the 'force' mode to the 'escape' modifier; add the 'raw' modifier.
This is looking great, @Amaury ! How do you propose we release this? Do you think this calls for a new major version, i.e. Smarty v6 or a minor (v5.4)? One might argue this requires a major, because behavior is changing for existing templates that use |
About the release, I would say that a minor version should be enough; I don't know if anybody if really using auto-escaping and |
Thank you! :) |
In the end, do you think you will create a major version or a minor one? |
I'm thinking minor. |
This evolution improves the auto-escaping feature.
escape
modifier has no effect when auto-escaping is enabled (when no escape format is given, or when thehtml
format is used), to prevent double-escaping.escape
modifier (htmlall
,url
,urlpathinfo
,quotes
,javascript
) are processed as we may expect, without double-escaping.force
format of theescape
modifier allows to force double-escaping if needed.raw
modifier temporary disables auto-escaping for the expression it is used on.This Pull Request contains the source code of this evolution, as well as its documentation and unit tests.