Allow xlinks to in SVG files
Closed, InvalidPublic


As per bug 3537, rendering silently fails for SVG files that refer to external resources, even those on our own server. I propose that linking to external resources on the domain (using the xlink:href attribute of the image tag) be allowed.

Steps to Reproduce:

  1. Go to
  2. The full-size version works in browsers that support SVG. They successfully load Check to see if a server-generated preview is properly displayed.

Actual Results: Rendering of the preview silently fails.

Expected Results: Rendering of the preview should succeed because the image is not stored on a different server (at least from the user's point of view) from the SVG.

Version: unspecified
Severity: enhancement

bzimport added a subscriber: Unknown Object (MLST).
bzimport set Reference to bz23377.
PleaseStand created this task.Via LegacyMay 2 2010, 4:24 AM
TheDJ added a comment.Via ConduitNov 4 2010, 4:28 AM

I don't think this is a good idea, because it is not a sustainable approach. Files move there. If you download an image, you expect that your file works. It shouldn't have to be dependent on having an internet connection, nor dependent on hoping that a Commons user doesn't propose to rename a file that you embed in your SVG.

brion added a comment.Via ConduitDec 27 2010, 3:41 AM

Resolving as INVALID; as noted above, such links would be unstable, and not suitable for linking between resources on a dynamic wiki system.

If interested in such things though, I'd recommend picking up thoughts from bug 7849 "Find a way to parse SVG files to render wikilinks" or other entries on parameterized SVG ideas.

Anything built this way will need to be able to survive being moved from site to site, from version to version, etc -- just as wikitext links are not raw URLs hardcoding

Add Comment