smarty-php / smarty-php/smarty
Escape Html - turn on / set a true by default
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 2.3k
- Forks
- 709
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
Since you release new version (v4) and in future versions, make no sense nowadays the option $smarty->escape_html not be set a true or with $smarty->default_modifiers not without a this option: ['escape:"htmlall"'] .
Because without at least one of the options activated the library is not avoiding XSS attacks.
And since you have a section for designers, since people without php knowledge, will forget escape modifier.
Finally, since smarty is a compiler template engine, i think should have the same behavior of others compiled template engine like this standalone template: Twig and Latte .
Or like Blade template ( with laravel) .
Thank you.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing Smarty's escape_html and default_modifiers options and the reported behavior in version 4. Compare the proposed defaults with the Twig, Latte, and Blade behavior mentioned in the issue; done should mean the template engine provides safer escaping by default without leaving the intended configuration unclear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- security, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100