From 6714d9ac3f96edfb222ac1e420b7855199ed99b1 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 5 Oct 2010 23:23:45 +0200 Subject: [PATCH] Added json_encode filter --- lib/Twig/Extension/Core.php | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/lib/Twig/Extension/Core.php b/lib/Twig/Extension/Core.php index 33f1d09..02b5f43 100644 --- a/lib/Twig/Extension/Core.php +++ b/lib/Twig/Extension/Core.php @@ -47,6 +47,7 @@ class Twig_Extension_Core extends Twig_Extension // encoding 'urlencode' => new Twig_Filter_Function('twig_urlencode_filter', array('is_escaper' => true)), + 'json_encode' => new Twig_Filter_Function('json_encode'), // string filters 'title' => new Twig_Filter_Function('twig_title_string_filter', array('needs_environment' => true)), -- 1.7.2.5