From: Fabien Potencier Date: Wed, 6 Oct 2010 13:10:20 +0000 (+0200) Subject: renamed urlencode to url_encode X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=12fd54f1d4a262cb491b182ef8d93d8e84306b1c;p=web%2Fkonrad%2Ftwig.git renamed urlencode to url_encode --- diff --git a/CHANGELOG b/CHANGELOG index 3dffe26..a349573 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,13 +8,14 @@ Backward incompatibilities: * in Node classes, sub-nodes are now accessed via getNode() (instead of property access) attributes via getAttribute() (instead of array access) + * the urlencode filter had been renamed to url_encode * the implementation of template inheritance has been rewritten (blocks can now be called individually and still work with inheritance) * fixed error handling for if tag when a syntax error occurs within a subparse process * added a way to implement custom logic for resolving token parsers given a tag name * fixed js escaper to be stricter (now uses a whilelist-based js escaper) - * added the following filers: "constant", "trans", "replace" + * added the following filers: "constant", "trans", "replace", "json_encode" * added a "constant" test * fixed objects with __toString() not being autoescaped * fixed subscript expressions when calling __call() (methods now keep the case) diff --git a/lib/Twig/Extension/Core.php b/lib/Twig/Extension/Core.php index 02b5f43..66342e5 100644 --- a/lib/Twig/Extension/Core.php +++ b/lib/Twig/Extension/Core.php @@ -46,7 +46,7 @@ class Twig_Extension_Core extends Twig_Extension 'replace' => new Twig_Filter_Function('twig_strtr'), // encoding - 'urlencode' => new Twig_Filter_Function('twig_urlencode_filter', array('is_escaper' => true)), + 'url_encode' => new Twig_Filter_Function('twig_urlencode_filter', array('is_escaper' => true)), 'json_encode' => new Twig_Filter_Function('json_encode'), // string filters