mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-02 09:24:28 +02:00
Missed part of commit e7516556
in the merge.
This commit is contained in:
@@ -45,7 +45,9 @@ class EscapeModifierCompiler extends Base {
|
|||||||
// see https://html.spec.whatwg.org/multipage/scripting.html#restrictions-for-contents-of-script-elements
|
// see https://html.spec.whatwg.org/multipage/scripting.html#restrictions-for-contents-of-script-elements
|
||||||
return 'strtr((string)' .
|
return 'strtr((string)' .
|
||||||
$params[ 0 ] .
|
$params[ 0 ] .
|
||||||
', array("\\\\" => "\\\\\\\\", "\'" => "\\\\\'", "\"" => "\\\\\"", "\\r" => "\\\\r", "\\n" => "\\\n", "</" => "<\/", "<!--" => "<\!--", "<s" => "<\s", "<S" => "<\S" ))';
|
', array("\\\\" => "\\\\\\\\", "\'" => "\\\\\'", "\"" => "\\\\\"", "\\r" => "\\\\r",
|
||||||
|
"\\n" => "\\\n", "</" => "<\/", "<!--" => "<\!--", "<s" => "<\s", "<S" => "<\S",
|
||||||
|
"`" => "\\\\`", "\${" => "\\\\\\$\\{"))';
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
// pass through to regular plugin fallback
|
// pass through to regular plugin fallback
|
||||||
|
@@ -449,7 +449,9 @@ class DefaultExtension extends Base {
|
|||||||
// see https://html.spec.whatwg.org/multipage/scripting.html#restrictions-for-contents-of-script-elements
|
// see https://html.spec.whatwg.org/multipage/scripting.html#restrictions-for-contents-of-script-elements
|
||||||
'<!--' => '<\!--',
|
'<!--' => '<\!--',
|
||||||
'<s' => '<\s',
|
'<s' => '<\s',
|
||||||
'<S' => '<\S'
|
'<S' => '<\S',
|
||||||
|
"`" => "\\\\`",
|
||||||
|
"\${" => "\\\\\\$\\{"
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
case 'mail':
|
case 'mail':
|
||||||
|
Reference in New Issue
Block a user