find() convert `xlink:href` to `href`
See original GitHub issuecheerio@^1.0.0-rc.2
automatically converts xlink:href
to href
when using find()
.
cheerio.load('')('<span><svg ><use xlink:href="#1" /></svg></span>').find('use').prop('xlink:href') //undefined
cheerio.load('')('<span><svg ><use xlink:href="#1" /></svg></span>').find('use').prop('href') //#1
Since, Safari doesn’t support href
without the “xlink” prefix in svg yet. Maybe, leave xlink:href
as it was in cheerio@^0.22.0
is better?
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
xlink:href - SVG: Scalable Vector Graphics - MDN Web Docs
The xlink:href attribute defines a reference to a resource as a reference IRI. The exact meaning of that link depends on the context...
Read more >jquery turn a href to xlink:href - svg - Stack Overflow
I tried altering drupal views that generates these links for my site, but the system for security reasons, omits all attributes and links...
Read more >Get "svg: use: @xlink:href required" when <use> element is ...
I'm running into an issue where Prince 13.1 fails to recognize the "xlink:href" attribute I set on a number of SVG <use />...
Read more >XML Linking Language (XLink) Version 1.1 - W3C
Abstract. This specification defines the XML Linking Language (XLink) Version 1.1, which allows elements to be inserted into XML documents ...
Read more >XML, XLink and XPointer - W3Schools
The xlink:href attribute specifies the URL to link to. XLink Example. The following XML document contains XLink features: <?xml version="1.0" ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The serialization part should be fixed with the latest release.
Filed #1585 for this.