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

Issue when pasting from Illustrator #145

Closed
PierBover opened this issue Oct 29, 2018 · 2 comments
Closed

Issue when pasting from Illustrator #145

PierBover opened this issue Oct 29, 2018 · 2 comments

Comments

@PierBover
Copy link

PierBover commented Oct 29, 2018

When copying and pasting from Illustrator into SVGOMG I get this error:

Load failed: Error in parsing SVG: Text data outside of root node. Line: 13 Column: 1 Char:

The weird thing is, if I paste the markup into a text editor, and then copy and paste exactly the same thing, it works fine.

Here's the markup for that error:

<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In  -->
<svg version="1.1"
	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
	 x="0px" y="0px" width="65px" height="65px" viewBox="0 0 65 65" style="enable-background:new 0 0 65 65;" xml:space="preserve">
<style type="text/css">
	.st0{fill:#FFFFFF;}
	.st1{fill:none;}
</style>
<defs>
</defs>
<path class="st0" d="M38,9.5H13.8v46h37.4V22.7L38,9.5z M45.4,49.8H19.6V15.2h16.1l1.2,1.2v7.4h7.4l1.2,1.2V49.8z"/>
<rect class="st1" width="65" height="65"/>
</svg>

Using this tool there appears to be a 00 character in there messing things up:

image

Would you accept a PR to trim hidden characters when pasting?

@XhmikosR
Copy link
Collaborator

@jakearchibald this seems a duplicate of #68

@jakearchibald
Copy link
Owner

Agreed

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