[go: up one dir, main page]

Page MenuHomePhabricator

SVG <use> element with href attribute not displayed
Closed, InvalidPublicBUG REPORT

Description

Steps to replicate the issue:

  • Upload the SVG file with following codes
<?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 50 50">
 <defs>
  <text id="no_g_text" x="5" y="20">no g</text>
 </defs>
 <use href="#no_g_text"/>
 <text id="with_g_text" x="5" y="40">with g</text>
</svg>

What happens?:
https://commons.wikimedia.org/wiki/File:Librsvg_bug_nested_use_(2).svg

Librsvg_bug_nested_use_(2).svg.png (1×1 px, 10 KB)

What should have happened instead?:
<use> element with href attribute should be works the same as that with xlink:href attribute. As the xlink:href attribute is labeled deprecated, any file used href attribute should be respected.

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):
Documentation at MDN Web Docs: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/use

Event Timeline

The upstream developers have fixed it over 2 years ago, so it's reasonable to update librsvg for fix.

@Great_Brightstar This isn't about "reasonability" but software dependencies... In this case it's blocked on T216815 (which blocks e.g. T265549 or T193352).

JoKalliauer changed the task status from Open to Stalled.Oct 6 2022, 10:28 PM
JoKalliauer triaged this task as Lowest priority.

href without xlink is a SVG 2.0-feature, which is not officially released. This bug-report could be considered as malformed SVG 1.1-file, and could be closed as invalid.