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

<input> in <foreingObject> causes error #129

Closed
surma opened this issue Dec 14, 2020 · 1 comment · Fixed by #130
Closed

<input> in <foreingObject> causes error #129

surma opened this issue Dec 14, 2020 · 1 comment · Fixed by #130

Comments

@surma
Copy link

surma commented Dec 14, 2020

const htmlnano = require("htmlnano");
const str =`
<!DOCTYPE html>
<svg xmlns="http://www.w3.org/2000/svg" width=256 height=256>
  <foreignObject width=256 height=256>
      <input/>
  </foreignObject>
</svg>
nano.process(str).then(x => console.log(x.html))

Yields:

Promise { <pending> }
> (node:55753) UnhandledPromiseRejectionWarning: Error in parsing SVG: Unexpected close tag
Line: 0
Column: 131
Char: >
@SukkaW
Copy link
Contributor

SukkaW commented Dec 14, 2020

The Error is likely thrown by svgo. However, the issue seems to be related with #124.

I will implement a fix for it.

SukkaW added a commit to SukkaW/htmlnano that referenced this issue Dec 23, 2020
SukkaW added a commit to SukkaW/htmlnano that referenced this issue Dec 23, 2020
maltsev added a commit that referenced this issue Dec 23, 2020
Fix: minify svg correctly (#129)
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

Successfully merging a pull request may close this issue.

2 participants