optimized twig_escape_filter
authorArnaud Le Blanc <arnaud.lb@gmail.com>
Sun, 27 Nov 2011 15:13:43 +0000 (16:13 +0100)
committerArnaud Le Blanc <arnaud.lb@gmail.com>
Sun, 27 Nov 2011 15:13:43 +0000 (16:13 +0100)
commit7b8d476ea5e842cf9fb863e180dd86a983949970
tree5c1841b5a647be79c9415eeced3fc7e466aeca95
parentfba7f95bd2637af9a75bd0f3c0efb2bbf227ee9f
optimized twig_escape_filter

uses a static variable to avoid initializing the charsets array each
time the function is called; and does a hash lookup instead of array
search (saves a function call too).
lib/Twig/Extension/Core.php