Recommend this page to a friend! |
Classes of Victor Bolshov | Safer Blitz | README.md | Download |
|
Downloadsafer-blitzA small extension to Blitz template engine, adding template inheritance and auto-escaping. Template inheritancearticle.tpl:
layout.tpl:
PHP code:
The output:
Auto-escapingInitialize view:
In template:
In controller:
Result:
To output variable unescaped, use _raw($var)_ template API:
If anyone appears to be interested in this project, I will probably add proper escape methods to escape attributes, CSS, JS. For now, this is out of my personal scope of use though. |