[wp-trac] [WordPress Trac] #64511: Deprecate wp_sanitize_script_attributes()
WordPress Trac
noreply at wordpress.org
Thu Jan 15 15:48:28 UTC 2026
#64511: Deprecate wp_sanitize_script_attributes()
----------------------------+------------------------
Reporter: jonsurrell | Owner: jonsurrell
Type: task (blessed) | Status: assigned
Priority: normal | Milestone: 7.0
Component: Script Loader | Version:
Severity: normal | Keywords:
Focuses: |
----------------------------+------------------------
The `wp_sanitize_script_attributes()`
[https://developer.wordpress.org/reference/functions/wp_sanitize_script_attributes/
function] is no longer used by WordPress Core since [61485]. Its
additional utility of adding a `type` attribute was removed in [61415].
WordPress offers robust functionality for working with script tags:
[https://developer.wordpress.org/reference/functions/wp_get_script_tag/
wp_get_script_tag()] and
[https://developer.wordpress.org/reference/functions/wp_get_inline_script_tag/
wp_get_inline_script_tag()]. Developers are better off with these tools
that work with complete SCRIPT tags instead of partial snippets of HTML
text.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64511>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list