Skip to content

Commit

Permalink
bug 2469 compiled_template_cache_language option does not work proper…
Browse files Browse the repository at this point in the history
…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
rvelices committed Oct 13, 2011
1 parent 143637d commit 1cd0cda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/template.class.php
Expand Up @@ -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;
Expand Down

0 comments on commit 1cd0cda

Please sign in to comment.