From: Fabien Potencier Date: Tue, 8 Jul 2014 13:44:12 +0000 (+0200) Subject: minor #1333 Added disambiguation on using raw in expressions (OwlyCode) X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=82a034c5916a15caf884e11b650b92fefe96877a;p=konrad%2Ftwig.git minor #1333 Added disambiguation on using raw in expressions (OwlyCode) This PR was merged into the 1.16-dev branch. Discussion ---------- Added disambiguation on using raw in expressions I recently got in trouble using the ``raw`` filter in a ternary, leading to a value being escaped and me not expecting it. The code was : ``` {{ foo|striptags|length > 250 ? foo|striptags|slice(0, 250) ~ '...' : foo|raw }} ``` When foo's length was under 250 characters, the result of this expression was escaped. Here is the updated documentation to explain why. Commits ------- cec2b57 Added disambiguation on using raw in expressions --- 82a034c5916a15caf884e11b650b92fefe96877a