Remove is_escaper flag from urlencode
authorJordi Boggiano <j.boggiano@seld.be>
Tue, 5 Oct 2010 21:51:42 +0000 (23:51 +0200)
committerFabien Potencier <fabien.potencier@gmail.com>
Sun, 7 Nov 2010 19:46:32 +0000 (20:46 +0100)
urlencode is an url escaper but not an html escaper so I don't think it should be exempt from auto-escaping

lib/Twig/Extension/Core.php

index 75091d2..72d1735 100644 (file)
@@ -46,7 +46,7 @@ class Twig_Extension_Core extends Twig_Extension
             'replace' => new Twig_Filter_Function('twig_strtr'),
 
             // encoding
-            'url_encode'  => new Twig_Filter_Function('twig_urlencode_filter', array('is_safe' => array('html'))),
+            'url_encode'  => new Twig_Filter_Function('twig_urlencode_filter'),
             'json_encode' => new Twig_Filter_Function('json_encode'),
 
             // string filters