Fix bug #62: Handle various kinds of relative URLs #129

Merged
merged 1 commit into from Dec 13, 2012

Conversation

Projects
None yet
3 participants
Contributor

SimonSapin commented Dec 10, 2012

This is still not a full URL parser as in http://url.spec.whatwg.org/
but should be good enough.

Contributor

SimonSapin commented Dec 10, 2012

Should also update prefixfree.min.js but I’m not sure how to do that.

Owner

LeaVerou commented Dec 10, 2012

Hi,

Thanks for contributing.
Which (real world) cases does the current code fail on?

Contributor

SimonSapin commented Dec 10, 2012

As #62 says, it fails with domain-relative URLS like url(/img/logo.png) when the stylesheet is not on the same domain as the document (which in turn requires the appropriate CORS headers on the stylesheet.)

Contributor

SimonSapin commented Dec 10, 2012

Although much less common, scheme-relative URLs like //example.net/foo.png can be useful when something works on both HTTP and HTTPS.

Just had this issue today ( #130 ) fixed tested and this fixed it, however I am not able to minimize the code without causing errors. (needs some Linting maybe?)

Owner

LeaVerou commented Dec 13, 2012

Simon, were you able to minify?

Contributor

SimonSapin commented Dec 13, 2012

I was about to ask: how do you minify? A small “how to minify” in the README would be great.

@SimonSapin SimonSapin Fix bug #62: Handle various kinds of relative URLs
This is still not a full URL parser as in http://url.spec.whatwg.org/
but should be good enough.
4ba0103
Contributor

SimonSapin commented Dec 13, 2012

Ok, minified.

@LeaVerou LeaVerou added a commit that referenced this pull request Dec 13, 2012

@LeaVerou LeaVerou Merge pull request #129 from SimonSapin/issue62
Fix bug #62: Handle various kinds of relative URLs
ce169c8

@LeaVerou LeaVerou merged commit ce169c8 into LeaVerou:gh-pages Dec 13, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment