Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG styles in CSS files break Job._replace #52

Open
arvidkahl opened this issue Mar 16, 2014 · 1 comment
Open

SVG styles in CSS files break Job._replace #52

arvidkahl opened this issue Mar 16, 2014 · 1 comment

Comments

@arvidkahl
Copy link

SVG-related styles like behavior:url("#default#VML"), while being obnoxious and odd in themselves, break the Job.prototype._replace method by yielding a null value for resourceUrl.pathname in the url.parse call.

I tried using options.match to circumvent the plugin from crashing, but it was trying to match on an undefined value. So I changed job.js:87 to

if (!resourceUrl.pathname || !resourceUrl.pathname.match(options.match)) { ...

This is a hack, however. There is probably a better place for a sanity check like this, since this only works if options.match is being used.

I work with SVG styles since I am using the leaflet library and some addons there have their own (weird little) SVG styles which I concatenate into my CDN css.

@johnnyhalife
Copy link
Contributor

Can you send a PR?

On Sun, Mar 16, 2014 at 12:08 PM, Arvid Kahl notifications@github.comwrote:

SVG-related styles like behavior:url("#default#VML"), while being
obnoxious and odd in themselves, break the Job.prototype._replace method by
yielding a null value for resourceUrl.pathname in the url.parse call.

I tried using options.match to circumvent the plugin from crashing, but
it was trying to match on an undefined value. So I changed job.js:87 to

if (!resourceUrl.pathname || !resourceUrl.pathname.match(options.match)) { ...

This is a hack, however. There is probably a better place for a sanity
check like this, since this only works if options.match is being used.

I work with SVG styles since I am using the leaflet library and some
addons there have their own (weird little) SVG styles which I concatenate
into my CDN css.


Reply to this email directly or view it on GitHubhttps://github.com//issues/52
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants