[wp-trac] [WordPress Trac] #63887: Add sourceURL to inline scripts and styles
WordPress Trac
noreply at wordpress.org
Mon Sep 1 09:13:24 UTC 2025
#63887: Add sourceURL to inline scripts and styles
--------------------------------------+------------------------------
Reporter: jonsurrell | Owner: jonsurrell
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.9
Component: Script Loader | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses: javascript, css
--------------------------------------+------------------------------
Comment (by jonsurrell):
I did some testing with CSS concat as well. The same issue is not a
concern because CSS does not have line-based comments so they always
terminate.
However, separate inline styles can still be concatenated with multiple
`sourceURL` so it seems best to disable there as well.
An approach to disable the comments when concatenating scripts/styles
seems to fix the issues and removes the problem of multiple `sourceURL`
comments in a single inline script/style.
Some descriptive `sourceURL` comment could be added to concatenated
scripts, but with efforts like #57548 it doesn't seem worth investing more
effort to better support concatenation.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63887#comment:28>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list