mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
add javascript escape parameter to escape modifier
This commit is contained in:
10
NEWS
10
NEWS
@@ -1,11 +1,13 @@
|
|||||||
|
- add javascript parameter to escape modifier (Monte)
|
||||||
|
- added correct line numbers to syntax error messages
|
||||||
|
in compiler (Monte)
|
||||||
- added support for modifiers to function calls (Monte)
|
- added support for modifiers to function calls (Monte)
|
||||||
- support return value for custom functions (Monte)
|
- support return value for custom functions (Monte)
|
||||||
- can access constants via $smarty.const.FOO (Monte)
|
- can access constants via $smarty.const.FOO (Monte)
|
||||||
- cleaned up regex code in compiler (Monte)
|
- cleaned up regex code in compiler (Monte)
|
||||||
- can now pass modifiers to static content,
|
- can now pass modifiers to static content (Monte)
|
||||||
among other minor syntax features (monte)
|
- fix up regex code in compiler, more flexible and
|
||||||
- fix up regex code in compiler, make much more flexible
|
maintainable (Monte)
|
||||||
(Monte)
|
|
||||||
- added support for object method access (Monte)
|
- added support for object method access (Monte)
|
||||||
- added day_value_format to html_select_date (Marcus
|
- added day_value_format to html_select_date (Marcus
|
||||||
Bointon, Monte)
|
Bointon, Monte)
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
<style-specification id="docbook-smarty-html" use="docbook">
|
<style-specification id="docbook-smarty-html" use="docbook">
|
||||||
<style-specification-body>
|
<style-specification-body>
|
||||||
|
|
||||||
(define %html-ext% ".html")
|
(define %html-ext% ".php")
|
||||||
|
|
||||||
&html-common.dsl;
|
&html-common.dsl;
|
||||||
&common.dsl;
|
&common.dsl;
|
||||||
|
@@ -37,6 +37,10 @@ function smarty_modifier_escape($string, $esc_type = 'html')
|
|||||||
}
|
}
|
||||||
return $return;
|
return $return;
|
||||||
|
|
||||||
|
case 'javascript':
|
||||||
|
// escape quotes and backslashes and newlines
|
||||||
|
return str_replace(array('\\','\'',"\r","\n"), array("\\\\", "\\'",'\r','\r'), $string);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return $string;
|
return $string;
|
||||||
}
|
}
|
||||||
|
@@ -37,6 +37,10 @@ function smarty_modifier_escape($string, $esc_type = 'html')
|
|||||||
}
|
}
|
||||||
return $return;
|
return $return;
|
||||||
|
|
||||||
|
case 'javascript':
|
||||||
|
// escape quotes and backslashes and newlines
|
||||||
|
return str_replace(array('\\','\'',"\r","\n"), array("\\\\", "\\'",'\r','\r'), $string);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return $string;
|
return $string;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user