[wp-trac] [WordPress Trac] #40737: Script tags inside unclosed HTML comment in value passed to WP_Script->localize() breaks page
WordPress Trac
noreply at wordpress.org
Thu Dec 4 19:16:17 UTC 2025
#40737: Script tags inside unclosed HTML comment in value passed to
WP_Script->localize() breaks page
---------------------------+------------------------------
Reporter: rmarscher | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone: Awaiting Review
Component: Script Loader | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses: javascript
---------------------------+------------------------------
Changes (by jonsurrell):
* status: new => closed
* resolution: => fixed
Comment:
The issue here is very similar to the example I shared in #63851. This is
a specific case of that general problem of incorrectly escaped JSON in
script tags.
This was fixed by the work on that ticket in [60681].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40737#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list