-
Notifications
You must be signed in to change notification settings - Fork 0
Fix inline script tag escaping #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Changes from 9 commits
353fa40
adc0ab3
1639b2b
fe6434d
ced9c0f
4b194ef
f8df461
b26f45d
4b9aa42
4f6d9d3
7372021
bafb5fe
e60d592
092eecf
ed22488
529afad
981d8e1
a96d8ac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -3735,8 +3735,30 @@ public function set_modifiable_text( string $plaintext_content ): bool { | |||||
| * properly escape these things, but this could mask regex patterns | ||||||
| * that previously worked. Resolve this by not sending `</script` | ||||||
| */ | ||||||
| if ( false !== stripos( $plaintext_content, '</script' ) ) { | ||||||
| return false; | ||||||
| if ( | ||||||
| false !== stripos( $plaintext_content, '</script' ) || | ||||||
| false !== stripos( $plaintext_content, '<script' ) | ||||||
| ) { | ||||||
| /* | ||||||
| * JavaScript can be safely escaped. | ||||||
| * Non-JavaScript script tags have unknown semantics. | ||||||
| * | ||||||
| * @todo consider applying to JSON and importmap script tags as well. | ||||||
|
||||||
| * @todo consider applying to JSON and importmap script tags as well. |
sirreal marked this conversation as resolved.
Show resolved
Hide resolved
sirreal marked this conversation as resolved.
Show resolved
Hide resolved
sirreal marked this conversation as resolved.
Show resolved
Hide resolved
Copilot
AI
Aug 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The @SInCE tag contains a placeholder '{WP_VERSION}' instead of an actual version number. This should be replaced with the specific WordPress version when this feature is released.
| * @since {WP_VERSION} | |
| * @since 6.5.0 |
Uh oh!
There was an error while loading. Please reload this page.