mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-03 13:51:36 +01:00
add "urlpathinfo" escape type to escape modifier. (apache does not like %2F in the PATH_INFO)
This commit is contained in:
@@ -30,6 +30,9 @@ function smarty_modifier_escape($string, $esc_type = 'html')
|
||||
case 'url':
|
||||
return rawurlencode($string);
|
||||
|
||||
case 'urlpathinfo':
|
||||
return str_replace('%2F','/',rawurlencode($string));
|
||||
|
||||
case 'quotes':
|
||||
// escape unescaped single quotes
|
||||
return preg_replace("%(?<!\\\\)'%", "\\'", $string);
|
||||
|
||||
Reference in New Issue
Block a user