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

Fix SVG download URL resolution for IE/Edge #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

radhikalism
Copy link
Owner

Extracts and decodes SVG source code from the generated data URL before saving SVG files using MS IE/Edge.

Without this change, the downloaded SVG files contain invalid data (the literal encoded data URL) instead of the original SVG source code.

@alexcjohnson
Copy link
Collaborator

@arbscht nice detective work!

We need to figure out a way to test this - probably should go in download_test but will need a bit of creative mocking. I can take a look at how to do that.

@alexcjohnson
Copy link
Collaborator

This is a definite improvement - from garbage output to actual SVG - but there's still an issue: somewhere we’re losing the # in clippath urls, so traces and shapes can overrun the margins. Investigating where that got broken... if it looks nontrivial we can merge this (at least you get a usable output, even if it's not perfect) but ideally I'd like to get the whole thing fixed at once.

@alexcjohnson
Copy link
Collaborator

Ah looks like we just forgot to put the # back in here

@alexcjohnson
Copy link
Collaborator

I don't have write access here so made a new PR to plotly.js -> plotly#2068

radhikalism pushed a commit that referenced this pull request Oct 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants