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