[wp-trac] [WordPress Trac] #25017: Dont allow empty $src parameter in wp_register_script
WordPress Trac
noreply at wordpress.org
Tue Aug 13 08:57:23 UTC 2013
#25017: Dont allow empty $src parameter in wp_register_script
--------------------------+------------------------------
Reporter: oskarhane | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.6
Severity: normal | Resolution:
Keywords: close |
--------------------------+------------------------------
Comment (by oskarhane):
Replying to [comment:2 jeremyfelt]:
> In a case such as this, there's not much of a difference between an
empty string and a URL that provides a broken version of jQuery or another
library entirely. I can't see comprehensive validation being possible in
this case. Suggest wontfix/close.
The difference is the intent of the developer. Leaving it empty vs. giving
a broken url is a big difference in my book.
Maybe the $src shouldn't be required since it has no function then?
An alternative solution could be to add something like ''wp_script_src''
to get the $src for registered scripts.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25017#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list