We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 554cfc0 commit 67250a0Copy full SHA for 67250a0
src/wp-includes/html-api/class-wp-html-tag-processor.php
@@ -3839,7 +3839,10 @@ public function set_modifiable_text( string $plaintext_content ): bool {
3839
*
3840
* @see https://html.spec.whatwg.org/multipage/parsing.html#script-data-double-escaped-state
3841
*/
3842
- if ( preg_match( '~</?script[\t\r\n\f />]~i', $plaintext_content ) ) {
+ if (
3843
+ false !== stripos( $plaintext_content, '</script' ) ||
3844
+ false !== stripos( $plaintext_content, '<script' )
3845
+ ) {
3846
/*
3847
* JavaScript can be safely escaped.
3848
* Non-JavaScript script tags have unknown semantics.
0 commit comments