Skip to content

treat .svg files as images - #40

Merged
biati-digital merged 1 commit into
biati-digital:masterfrom
AvoineOy:svg-as-img
Dec 4, 2018
Merged

biati-digital merged 1 commit into
biati-digital:masterfrom
AvoineOy:svg-as-img

Conversation

@tuomassalo

Copy link
Copy Markdown
Contributor

This PR changes the way svg files are treated. Before, they were enclosed in an <iframe>. Now they are treated as other images, enclosed in an <img> tag.

Pros: <img> tag allows loading svg files from arbitrary urls, without SOP restrictions.

Cons: <iframe> allows svg files to be interactive.

So, this might or might not be wanted - but it seems we currently don't have a way to override the url based heuristics in getSourceType() to set desired source type.

@biati-digital

Copy link
Copy Markdown
Owner

Agreed, svg files should be enclosed in a img tag

@biati-digital
biati-digital merged commit a2ca14f into biati-digital:master Dec 4, 2018
@tuomassalo
tuomassalo deleted the svg-as-img branch December 5, 2018 12:02
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

Successfully merging this pull request may close these issues.

2 participants