[wp-trac] [WordPress Trac] #58664: Eliminate manual construction of script tags in WP_Scripts and of inline scripts on frontend/login screen
WordPress Trac
noreply at wordpress.org
Fri Sep 29 19:46:09 UTC 2023
#58664: Eliminate manual construction of script tags in WP_Scripts and of inline
scripts on frontend/login screen
-------------------------------------------------+-------------------------
Reporter: westonruter | Owner:
| westonruter
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.4
Component: Script Loader | Version: 6.3
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests needs-dev- | Focuses: javascript
note |
-------------------------------------------------+-------------------------
Comment (by westonruter):
In [changeset:"56748" 56748]:
{{{
#!CommitTicketReference repository="" revision="56748"
Script Loader: Harden removal of script tag wrappers.
* Add `wp_remove_surrounding_empty_script_tags()` to more precisely remove
script tag wrappers and warn when doing it wrong.
* Add clarifying comments for XML escaping logic in
`wp_get_inline_script_tag()`.
* Leverage `WP_HTML_Tag_Processor` in
`test_remove_frameless_preview_messenger_channel`.
* Reuse `assertEqualMarkup` in
`test_blocking_dependent_with_delayed_dependency`.
* Normalize whitespace in `parse_markup_fragment` for `assertEqualMarkup`.
Follow-up to [56687].
Props dmsnell, westonruter, flixos90.
See #58664.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58664#comment:33>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list