Permalink
Browse files

bug 2469 compiled_template_cache_language option does not work proper…

…ly on some language keys because of double escaping

git-svn-id: http://piwigo.org/svn/trunk@12429 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information...
modus75 committed Oct 13, 2011
1 parent 143637d commit 1cd0cda111ea642b34d81436f9a68fb4cd1fe8a2
Showing with 1 addition and 1 deletion.
  1. +1 −1 include/template.class.php
@@ -771,7 +771,7 @@ static function prefilter_language($source, &$smarty)
$regex = "~$ldq *\'([^'$]+)\'\|@translate\|~";
$source = preg_replace_callback( $regex, create_function('$m', 'global $lang; return isset($lang[$m[1]]) ? \'{\'.var_export($lang[$m[1]],true).\'|\' : \'$m[0]\';'), $source);
$regex = "~($ldq *assign +var=.+ +value=)\'([^'$]+)\'\|@translate~e";
$regex = "~($ldq *assign +var=.+ +value=)\'([^'$]+)\'\|@translate~";
$source = preg_replace_callback( $regex, create_function('$m', 'global $lang; return isset($lang[$m[2]]) ? $m[1].var_export($lang[$m[2]],true) : \'$m[0]\';'), $source);
return $source;

0 comments on commit 1cd0cda

Please sign in to comment.