File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -3851,12 +3851,19 @@ public function set_modifiable_text( string $plaintext_content ): bool {
38513851 */
38523852 if ( $ this ->is_javascript_script_tag () ) {
38533853 $ plaintext_content = preg_replace_callback (
3854- '~<(/?)(s)(cript)([\t\r\n\f />])~i ' ,
3854+ /*
3855+ * This case-insensitive pattern consists of three groups:
3856+ *
3857+ * 1: "<" or "</"
3858+ * 2: "s"
3859+ * 3: "cript" + a trailing character that terminates a tag name.
3860+ */
3861+ '~(</?)(s)(cript[ \\t \\r \\n \\f />])~i ' ,
38553862 static function ( $ matches ) {
38563863 $ escaped_s_char = 's ' === $ matches [2 ]
38573864 ? '\\u0073 '
38583865 : '\\u0053 ' ;
3859- return "< {$ matches [1 ]}{$ escaped_s_char }{$ matches [3 ]}{ $ matches [ 4 ]}" ;
3866+ return "{$ matches [1 ]}{$ escaped_s_char }{$ matches [3 ]}" ;
38603867 },
38613868 $ plaintext_content
38623869 );
You can’t perform that action at this time.
0 commit comments