| Zeile 62... |
Zeile 62... |
| 62 |
case 'javascript':
|
62 |
case 'javascript':
|
| 63 |
// escape quotes and backslashes, newlines, etc.
|
63 |
// escape quotes and backslashes, newlines, etc.
|
| 64 |
// see https://html.spec.whatwg.org/multipage/scripting.html#restrictions-for-contents-of-script-elements
|
64 |
// see https://html.spec.whatwg.org/multipage/scripting.html#restrictions-for-contents-of-script-elements
|
| 65 |
return 'strtr((string)' .
|
65 |
return 'strtr((string)' .
|
| 66 |
$params[ 0 ] .
|
66 |
$params[ 0 ] .
|
| 67 |
', array("\\\\" => "\\\\\\\\", "\'" => "\\\\\'", "\"" => "\\\\\"", "\\r" => "\\\\r", "\\n" => "\\\n", "</" => "<\/", "<!--" => "<\!--", "<s" => "<\s", "<S" => "<\S" ))';
|
67 |
', array("\\\\" => "\\\\\\\\", "\'" => "\\\\\'", "\"" => "\\\\\"", "\\r" => "\\\\r",
|
| - |
|
68 |
"\\n" => "\\\n", "</" => "<\/", "<!--" => "<\!--", "<s" => "<\s", "<S" => "<\S",
|
| - |
|
69 |
"`" => "\\\\`", "\${" => "\\\\\\$\\{"))';
|
| 68 |
}
|
70 |
}
|
| 69 |
} catch (SmartyException $e) {
|
71 |
} catch (SmartyException $e) {
|
| 70 |
// pass through to regular plugin fallback
|
72 |
// pass through to regular plugin fallback
|
| 71 |
}
|
73 |
}
|
| 72 |
// could not optimize |escape call, so fallback to regular plugin
|
74 |
// could not optimize |escape call, so fallback to regular plugin
|