|
escaping
Sugar
|
|
|||
|
|
Trunk now has something a little on the experimental side now. I have removed the SugarEscaped class entirely, as well as the echo function. Instead, now, there is a new magic modifier |raw that, if given, suppresses the default escaping. It only has any effect when used on a top-level statement (because those are the only places automatic escaping happens). The magic is extended to |escape such that if you manually escape the output it will not then automatically escape it yet again. Note that -- as of right now -- there is now no longer a way to make a function that suppresses automatic escaping, so any functions that spit out HTML must be given the |raw modifier. Think I need to fix that. Note entirely sure what I'm going to do, though. Might just add a noescape flag similar to the nocache flag for functions. |
||