Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for xmlns:xlink #42

Closed
sayjeyhi opened this issue Apr 21, 2020 · 3 comments
Closed

support for xmlns:xlink #42

sayjeyhi opened this issue Apr 21, 2020 · 3 comments

Comments

@sayjeyhi
Copy link

the xmlns:xlink will convert to xmlns xlink when we call toString()

@taoqf
Copy link
Owner

taoqf commented Apr 23, 2020

Sorry, I am a little busy recently, pr is welcomed.

@Schizhats
Copy link

Schizhats commented Feb 25, 2021

Hello

Thank you for this library, it helped me a lot in one of my projects.
However I had problems with the attributes when reading a SVG, I had "xmlns" & "xmlns:xlink" attributes, the problem is that the "rawAttributes" doesn't take into account these attributes.

I don't know how I should proceed to fix a bug with your library. So I made a fork.

If you want to have the resolution of the problem here is my public git. (https://github.com/Wanderer-Guy/node-html-svg-parser)

The error was in the regex of "rawAttributes" here is the regex that solved my problem: /\b([a-z][a-z0-9-_:]*)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|(\S+))))?/ig; (src/nodes/html.ts)
I also added tests to "#rawAttributes" in (test/html.js)

taoqf added a commit that referenced this issue Apr 15, 2021
@taoqf
Copy link
Owner

taoqf commented Apr 15, 2021

@Schizhats Thanks. v3.1.5 is released.

@taoqf taoqf closed this as completed Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants