From 9cde36e3bc263b261b4f123876c5bf9c54817925 Mon Sep 17 00:00:00 2001 From: Mihail Haritonov Date: Sun, 28 Feb 2021 16:43:54 +0300 Subject: [PATCH 1/2] plugins: escape: javascript escaping secure fix --- libs/plugins/modifier.escape.php | 6 +++++- libs/plugins/modifiercompiler.escape.php | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libs/plugins/modifier.escape.php b/libs/plugins/modifier.escape.php index 150901c7..5f01362c 100644 --- a/libs/plugins/modifier.escape.php +++ b/libs/plugins/modifier.escape.php @@ -184,7 +184,11 @@ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $ '"' => '\\"', "\r" => '\\r', "\n" => '\\n', - ' '<\/' + ' '<\/', + // see https://html.spec.whatwg.org/multipage/scripting.html#restrictions-for-contents-of-script-elements + '