Skip to content

repeated xlink:href on 'use' elements #12

@tiarno

Description

@tiarno

The SVG result contains 'use' elements that have duplicate xlink:href elements. That is, using two terminal windows (this is win7)

  1. phantomjs.exe main.js
  2. wget http://localhost:16000/?q=x+e -O test.svg

The resulting SVG has 'use' elements like this:

<use xlink:href="#MJMATHI-78" x="0" y="0" xlink:href="#MJMATHI-78">

What I did to fix it was to replace line 73 in engine.js, which inserts the attribute, with this conditional block:

  if (uses[k]["href"] === undefined) {
      uses[k].setAttribute("xlink:href", id);
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions