Protocol-relative URLs can’t be excluded using a filter
-
Hi!
I’ve found a workaround, so this isn’t high priority, but I still wanted to inform you.
When using the
sgo_javascript_combine_exclude
filter, to exclude an enqueued JS library by handle, when the src is a protocol relative URL your plugin doesn’t handle this properly.An example, if you enqueue a script with source:
//yourdomain.com/wp-content/uploads/script.js
and add this to the list of exclusions using the aforementioned filter, this’ll result inyourdomain.com/wp-content/uploads/script.js
being added to the list of exclusions (the$this->excluded_urls
property).It’s due to this line of code in the
Js_Combinator
class:Cheers!
- The topic ‘Protocol-relative URLs can’t be excluded using a filter’ is closed to new replies.