diff --git a/change_log.txt b/change_log.txt index b016c31d..eff5b698 100644 --- a/change_log.txt +++ b/change_log.txt @@ -2,6 +2,7 @@ 06.02.2012 - improvement stream_resolve_include_path() added to Smarty_Internal_Get_Include_Path (Forum Topic 20980) - bugfix fetch('extends:foo.tpl') always yielded $source->exists == true (Forum Topic 20980) +- added modifier unescape:"url", fix (Forum Topic 20980) 30.01.2012 - bugfix Smarty_Security internal $_resource_dir cache wasn't properly propagated diff --git a/libs/plugins/modifiercompiler.unescape.php b/libs/plugins/modifiercompiler.unescape.php index ce0bd639..4321ff18 100644 --- a/libs/plugins/modifiercompiler.unescape.php +++ b/libs/plugins/modifiercompiler.unescape.php @@ -30,16 +30,19 @@ function smarty_modifiercompiler_unescape($params, $compiler) switch (trim($params[1], '"\'')) { case 'entity': - return 'mb_convert_encoding(' . $params[0] . ', ' . $params[2] . ', \'HTML-ENTITIES\')'; case 'htmlall': if (Smarty::$_MBSTRING) { return 'mb_convert_encoding(' . $params[0] . ', ' . $params[2] . ', \'HTML-ENTITIES\')'; } - return 'html_entity_decode(' . $params[0] . ', ENT_QUOTES, ' . $params[2] . ')'; + + return 'html_entity_decode(' . $params[0] . ', ENT_NOQUOTES, ' . $params[2] . ')'; case 'html': return 'htmlspecialchars_decode(' . $params[0] . ', ENT_QUOTES)'; + case 'url': + return 'rawurldecode(' . $params[0] . ')'; + default: return $params[0]; }