Page MenuHomePhabricator

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


Steps to replicate the issue:

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

What happens?:

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:

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.