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

SVG files that start with XML header cause issues when used as a component #94

Closed
simensen opened this issue Sep 12, 2020 · 4 comments · Fixed by #116
Closed

SVG files that start with XML header cause issues when used as a component #94

simensen opened this issue Sep 12, 2020 · 4 comments · Fixed by #116
Labels

Comments

@simensen
Copy link

simensen commented Sep 12, 2020

  • Library Version: 0.4.5
  • Laravel Version: 8.1.0
  • PHP Version: 7.4.6

Description:

When an SVG is used as a component and happens to have <?xml header, things go wonky.

Important to note that you can still use @svg() just fine. It's only when you try to use the x- component that it breaks.

Steps To Reproduce:

Trying to use this SVG gives an error...

<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 viewBox="0 0 665 638" style="enable-background:new 0 0 665 638;" xml:space="preserve">
<g id="eozbYU_1_">
	<g>
		<g>
			<path d="M447.7,275.6c-0.8,2.2-0.9,4-1.8,4.6c-4.2,2.8-4.4,6.7-4,11c0.5,4.9,1,9.9,1.2,14.8c0.2,5.5,1,10.5,4,15.6
				c1.8,3.1,1,8.7-0.4,12.5c-0.9,2.4-1.5,3.9-0.3,6.2c2.8,5.4,2.4,8.5-1.4,11.4c-5.5,4.1-10.7,4.2-15,0.5c-2-1.7-4.2-3.3-6.3-4.8
				c-4.1-2.8-7.3-6-7.2-11.7c0-2.6-1.6-5.3-2.5-8c-0.6,0-1.2,0-1.9,0c-1.6,3-3.1,6-4.8,8.9c-1.3,2.1-2.6,4.3-4.4,5.9
				c-3.2,2.7-5.8,5.3-6.1,9.8c-0.1,1.3-1.3,2.6-2.3,3.7c-2.3,2.8-4.8,5.4-7.2,8.1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.6-8.3,0.6-16.6,0.9-24.8c0.1-1.3,0.2-2.7,0.8-3.8c2.1-3.5,4.3-6.8,2.5-11.2
				c-0.1-0.1-0.1-0.4,0-0.5c7.4-13.7-5.8-17.9-12-24.9c-7.1-8-15.4-14.9-23.4-22.1c-8.2-7.4-16.1-14.8-27-19.1
				c-6.8-2.7-12.3-9.9-17.2-16c-4.6-5.7-0.5-17.9,6.3-21.2c6.9-3.3,13.7-3.1,20.5,1c7.9,4.8,15.1,10.6,22.4,16.3
				c11.5,8.9,22.8,18,33.2,28.1c4.3,4.2,6.8,3.6,8.6-2c2.2-6.8,3.5-13.8,5.6-20.7c0.8-2.6,2.8-4.9,3.8-7.5c1.3-3.4,2.1-7,3.1-10.6
				c2.4-8.5,10.3-11.5,16.9-15.1c5-2.7,11.8,4.9,8.9,10.9c-6.5,13.3-4.8,28.3-9.9,41.8c-1.9,5.1-3.9,10.2-6.3,15.1
				c-4.1,8.7-2.5,16,5.7,23c10.3,8.9,20.8,17.6,31.1,26.5c5.4,4.6,10.2,9.9,15.7,14.3c3.8,3.1,8.3,5.4,12.6,7.9
				c6.4,3.8,12.8,7.7,19.4,11.3c1.1,0.6,3.3,0.1,4.5-0.7c2.7-1.6,5.2-3.6,7.6-5.6c4.8-3.9,20.5-5.8,25.8-2.5c1.7,1.1,2.2,4.2,3,6.4
				c0.7,2.1,0.4,4.7,1.6,6.5c4.2,6.5,3,11.1-4.1,14.4c-7.6,3.6-8.2,6.7-1.4,12c4.1,3.2,7,6.1,7.6,11.7c0.3,2.8,4.3,5.1,5.6,8.1
				c2,4.7,3.3,9.8,4.5,14.8c0.1,0.5-2.1,2-3.3,2.2c-4.5,0.5-8.9,0.8-13.4,0.7c-2.9,0-4.6-1.3-6.2-4.4c-2.4-4.5-6.8-7.9-10.5-11.6
				c-1.4-1.4-3.1-2.4-4.7-3.7c-3.3-2.8-7.1-2.2-9.5,1c-4.3,5.6-8.8,11-13.3,16.4c-4.1,4.8-8.2,9.6-12.4,14.2
				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,3.7-20.9,6.3-31.1c2-7.7,5.6-15,8.1-22.6c1.3-3.9,1.8-8,2.9-11.9c2.6-9.2,14.4-19,24.7-16.1c0.3,0.1,0.7,0.2,1,0.1
				c11-2.8,19.1,3.4,25,10.5c4.2,5.1,12.2,10.5,8,19.8c-0.2,0.5-0.2,1.4,0,1.9c1.4,4,2.2,8.5,4.6,11.8c7,9.5,7.6,21.4,12.3,31.7
				c0.5,1.2,0.6,2.6,0.7,3.9c1.4,12.9,2.6,25.9,4.3,38.8c0.7,5.1,3.1,10,3.5,15c0.7,10.6,0.6,21.3,0.7,32c0,4.8-0.3,9.7-0.2,14.5
				c0,3.6,0.1,6.9-3.6,9.2c-0.8,0.5-1.4,3-0.8,3.8c4.2,6.1,2.5,12.8,2.5,19.4c0,0.7-0.5,1.6-0.2,1.9c5.3,6.7,1,15.1,4.2,22.4
				c3,7,3.7,15,5.3,22.6c0.3,1.4,0.5,3.5-0.2,4.4c-3.4,4.1-2,7.6-0.4,12.1c3.1,8.5-4.4,17.1-13.5,16.6c-2-0.1-4-0.6-6-0.6
				c-11.4-0.4-11.8-0.3-14.5-11.5c-2.7-11.4-5.4-22.9-6.8-34.5c-1-8.8,0.3-17.9,0.2-26.9c0-3.8-1.3-7.6-1.7-11.5
				c-0.3-2.7-0.1-5.5,0-8.3c0-1.7,0.3-3.3,0.2-5c-0.3-4.6-0.8-9.2-1.1-13.7c-0.3-4.9-1.4-5.6-6.1-4.6
				C470.1,270.8,458.5,273.2,447.7,275.6z M118.1,435.7c1.3,7.3,3.2,18.4,5.2,29.4c0.2,1,1.7,1.8,2.5,2.6c0.8-0.9,1.7-1.7,2.4-2.7
				c2.7-4.1,5.1-8.4,8.2-12.2c4.1-5.1,8.7-9.7,13-14.6c5.2-6,11.8-11,14.6-18.9c0.3-0.8,1.5-1.3,2.1-2.1c3.2-3.8,7.6-7.1,9.2-11.5
				c3.3-8.9,9.5-15,16.2-21.1c2.4-2.2,3.9-5.6,5.7-8.5c2.7-4.4,5.2-9,8.1-13.2c2.2-3.1,5.1-5.7,7.4-8.7c3.6-4.6,3.2-6.9-2.4-8
				c-7.3-1.5-14.8-1.9-22.2-2.7c-1.8-0.2-3.5-0.3-5.3-0.7c-3.1-0.8-6.2-1.7-9.3-2.6c-2.5-0.7-5.3-0.9-7.5-2
				c-4.7-2.4-8.9-6.3-13.9-7.6c-12.9-3.3-25-8.1-36.6-14.7c-3.1-1.8-5.9-1.3-7.6,2.1c-2.5,5.1-6.8,9.8-2.9,16.1
				c0.5,0.7,0.1,2,0.2,2.9c0.7,6.7,1.1,13.5,2.2,20.2c2.1,13.3,6.5,26.3,4.6,40.2c-0.5,3.7-0.4,8,1.1,11.2
				C117,416.1,118.2,423.8,118.1,435.7z M110.9,128.4c-2.3,3.4-4.2,5.6-5.3,8.2c-1.1,2.5-2.1,5.3-1.9,7.9c0.8,9.3,2.2,18.6,3.1,27.9
				c0.2,1.7-1.3,3.4-1.5,5.2c-0.6,4.4-1,8.7-1.4,13.1c-0.1,1.1,0.3,2.4-0.1,3.3c-2.8,6.7-5.3,13.4,1.4,19.4c0.1,0.1,0,0.3-0.1,0.9
				c-5,1.1-4.2,4.5-2.9,8.3c2.8,8.2,3.2,16.1-1.7,23.9c-1.5,2.4-0.6,6.1-1.2,9.2c-1.1,5.8,3.5,8.1,7.1,9.1c1.9,0.5,5.7-3.1,7.5-5.7
				c4.7-6.4,8.8-13.3,13.3-19.9c0.8-1.2,2.2-2,3.3-2.9c2.2-1.9,4.7-3.7,6.7-5.9c11.1-12.7,22.1-25.4,32.9-38.2c3-3.5,5.5-7.4,8-11.3
				c0.7-1.1,1.1-3.4,0.5-4.1c-3.3-4-6.5-8.5-10.7-11.5c-6.8-4.7-15.2-6-21.7-12.2c-6.9-6.6-15.7-11-23.7-16.4
				C118.4,133.9,114.5,131,110.9,128.4z M444.4,232.1c3.8,0,8.4,1.4,11.4-0.3c8.7-4.7,18.5-4.7,27.6-7.5c3.5-1.1,4.7-2.7,4.3-5.9
				c-0.5-4.1-1-8.2-1.6-12.4c-1.2-8.5-1.8-17.2-4-25.4c-2.1-8.1-0.5-17.4-7.4-24c-0.7-0.7-0.4-2.3-0.8-3.3
				c-1.7-4.3-3.2-8.7-5.3-12.8c-1.4-2.7-3.8-3.7-5.2,0.2c-2.5,6.7-7.7,12.4-6.7,20.2c0.1,1-0.9,2.1-1.3,3.1c-0.7,2-1.7,3.9-2.1,5.9
				c-1.8,8.7-2.5,17.8-5.5,26c-2.7,7.3-3.1,14.5-3.3,21.9C444.3,222.6,444.4,227.2,444.4,232.1z"/>
			<path d="M532.2,243.8c-1.4-3.7-2.9-7.3-4.2-11c-0.4-1.1-0.2-2.5-0.2-3.7c0.4-6.4,0.9-12.8,1.2-19.2c0.1-2.5,0.2-5,0-7.4
				c-0.5-9.9-1.4-19.8-1.4-29.8c0-5.9,1.2-11.8,1.9-17.7c0.2-2,1.3-4.1,0.7-5.8c-3.7-12.6,3.7-23.1,6.2-34.5c1.2-5.3,3.5-9.8,8-13.3
				c3-2.3,5.8-3.8,9.5-2c1.6,0.8,3.5,1.3,5.2,1.6c4.8,0.6,7.7,2.8,7.8,8c0,0.8,0.1,1.9,0.6,2.4c5.7,5.8,4,13,3.7,19.9
				c-0.8,20.6-5.6,40.9-3.9,61.6c0.9,10.9,2.4,21.8,2.6,32.7c0.1,6.5,1.1,12.4,2.6,18.7c2.1,8.9,2,18.3,3.3,27.5
				c0.4,3,2.3,5.8,3.5,8.7c2.8,6.5,5.8,12.9,8.3,19.5c2.6,6.8,8.8,9.7,14.2,13.3c1.3,0.9,4,0.5,5.7-0.1c8.2-3.1,12.5-9.3,14.1-17.8
				c1.2-6.6,2.5-13.3,4.1-19.8c0.6-2.7,2.7-5,3.1-7.7c0.9-5.8,0.3-12,1.8-17.6c1.5-5.8,1.9-11.4,1.5-17.4
				c-0.6-10.6,0.1-21.3-0.6-31.9c-0.7-11-2.4-22-3.9-32.9c-1.4-10.4-3-20.9-5-31.2c-1.2-6.1-3.6-11.9-5-18c-2-8.9-2.9-18-5.4-26.8
				c-2.1-7.4-3.9-14.9-7.2-22.1c-3.4-7.5-4.9-16.7-1.4-25.1c1.8-4.4,13.1-6.1,18.1-2c6.1,5,11,11.3,16.4,17.1
				c0.4,0.5,0.6,1.8,0.2,2.3c-3.2,3.9-1.2,7.9-0.4,11.9c2.1,10.5,4.3,21,6.5,31.6c0.1,0.3,0,0.8,0.2,1c6,6.5,6.1,15.4,9,23.1
				c0.4,1.1,1.3,2.2,1.2,3.2c-1.3,8.9,3.1,17,4,25.5c1.1,9.7,3.6,19.2,5.1,28.8c0.6,4.2,0.5,8.5,0.4,12.8
				c-0.4,12.2-1.6,24.4-1.3,36.6c0.3,10.3-2.5,19.8-4.8,29.5c-0.4,1.6-0.2,3.4-0.1,5.1c0.1,2.7,1.5,6,0.4,8.1
				c-3,5.7-2.2,11.6-2.9,17.4c-0.6,4.8-2.7,9.3-4.3,14c-0.3,0.9-1.5,1.7-1.4,2.5c0.7,9.4-6,15.3-10.6,22c-3.2,4.6-7.4,8.8-13.5,10.2
				c-2.1,0.5-4.4,1.3-5.8,2.7c-4.7,5-10.2,3.8-15.8,2.6c-5.6-1.3-11-3.3-16.7-4.1c-11.8-1.5-19.2-8.9-27-16.9
				c-9.1-9.4-10.4-21.9-15.8-32.7c-1.6-3.1-2.6-6.5-4.3-9.5c-4.8-8.8-5.3-18.8-7.7-28.2c-1.2-4.9-2-10-2.9-15
				C530.9,244.2,531.6,244,532.2,243.8z"/>
			<path d="M100.4,253.4c1.6-1.3,2.9-2.9,3.6-2.7c1.2,0.4,2.7,1.8,2.9,2.9c0.1,0.9-1.5,2.1-2.3,3.2
				C103.4,255.9,102.2,254.9,100.4,253.4z"/>
		</g>
	</g>
</g>
</svg>

... while this version does not...

<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 viewBox="0 0 665 638" style="enable-background:new 0 0 665 638;" xml:space="preserve">
<g id="eozbYU_1_">
	<g>
		<g>
			<path d="M447.7,275.6c-0.8,2.2-0.9,4-1.8,4.6c-4.2,2.8-4.4,6.7-4,11c0.5,4.9,1,9.9,1.2,14.8c0.2,5.5,1,10.5,4,15.6
				c1.8,3.1,1,8.7-0.4,12.5c-0.9,2.4-1.5,3.9-0.3,6.2c2.8,5.4,2.4,8.5-1.4,11.4c-5.5,4.1-10.7,4.2-15,0.5c-2-1.7-4.2-3.3-6.3-4.8
				c-4.1-2.8-7.3-6-7.2-11.7c0-2.6-1.6-5.3-2.5-8c-0.6,0-1.2,0-1.9,0c-1.6,3-3.1,6-4.8,8.9c-1.3,2.1-2.6,4.3-4.4,5.9
				c-3.2,2.7-5.8,5.3-6.1,9.8c-0.1,1.3-1.3,2.6-2.3,3.7c-2.3,2.8-4.8,5.4-7.2,8.1c-0.4,0.5-0.9,1-1.4,1.4
				c-4.7,3.5-9.1,7.7-14.2,10.2c-5.8,2.9-12.2,5-18.6,6.2c-6,1.1-12.3,0.5-18.4,1c-8,0.6-15.1-1.4-21.7-5.8
				c-7.8-5.2-15.4-10.4-20.6-18.4c-2.1-3.2-5.3-4.8-9.4-4.5c-4.8,0.3-9.7,0.4-14.4,0.1c-2-0.1-4-1.3-5.9-2.2
				c-4.7-2.4-7.3-1.5-9.9,3.1c-1.6,2.9-3.6,5.5-5.5,8.2c-5.5,8.2-10.9,16.4-17.8,23.7c-6.9,7.3-12.5,15.8-18.8,23.6
				c-5.2,6.4-10.6,12.7-15.9,18.9c-4.3,5-8.9,9.9-12.9,15c-2.6,3.4-4.2,7.6-7,10.8c-8.2,9.6-16.8,18.9-25.3,28.2
				c-4.2,4.6-9.3,8.6-13,13.6c-1.8,2.5-2.4,6.6-2.1,9.8c0.6,5.7,2.3,11.3,3.8,16.8c1,3.7,2.1,7.4,3.7,10.8
				c5.1,10.7,9.2,21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-39.7c-0.7-5.6,1.3-11.4,1.2-17.1
				c0-3.4-1.7-6.8-2.8-11.2c-2.4,2.7-4.3,4.2-5.4,6.1c-4.1,7.4-7.5,15-11.8,22.2c-5,8.5-6.9,19.2-17,24.4c-3.7,1.9-5.4,1.2-6.6-2.6
				c-1.3-4.2-2.7-8-1.8-12.9c0.6-3.5-1.6-7.8,0.8-11.3c4.4-6.5,3.6-14.3,5.9-21.2c2.4-7.4,6.6-14.2,10.2-21.2
				c1.9-3.8,4.2-7.5,6.3-11.2c1.5-2.6,2.7-5.4,4.7-7.6c5-5.4,5-12.2,5-18.7c0-7.3-6-10.3-11.3-13.3c-3.1-1.8-5.9-3-6.9-7.1
				c-0.6-2.2-3.7-3.7-5-5.9c-3.8-6.4-3.3-13.8-1.7-20.4c0.7-2.8,5.5-5.6,9-6.7c13.9-4.2,10-2.9,11.2-16.5c1-11.8-0.6-23.8-0.1-35.7
				c0.5-12.6,2.1-25.2,2.9-37.7c0.6-8.3,0.6-16.6,0.9-24.8c0.1-1.3,0.2-2.7,0.8-3.8c2.1-3.5,4.3-6.8,2.5-11.2
				c-0.1-0.1-0.1-0.4,0-0.5c7.4-13.7-5.8-17.9-12-24.9c-7.1-8-15.4-14.9-23.4-22.1c-8.2-7.4-16.1-14.8-27-19.1
				c-6.8-2.7-12.3-9.9-17.2-16c-4.6-5.7-0.5-17.9,6.3-21.2c6.9-3.3,13.7-3.1,20.5,1c7.9,4.8,15.1,10.6,22.4,16.3
				c11.5,8.9,22.8,18,33.2,28.1c4.3,4.2,6.8,3.6,8.6-2c2.2-6.8,3.5-13.8,5.6-20.7c0.8-2.6,2.8-4.9,3.8-7.5c1.3-3.4,2.1-7,3.1-10.6
				c2.4-8.5,10.3-11.5,16.9-15.1c5-2.7,11.8,4.9,8.9,10.9c-6.5,13.3-4.8,28.3-9.9,41.8c-1.9,5.1-3.9,10.2-6.3,15.1
				c-4.1,8.7-2.5,16,5.7,23c10.3,8.9,20.8,17.6,31.1,26.5c5.4,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-13.5,16.6c-2-0.1-4-0.6-6-0.6
				c-11.4-0.4-11.8-0.3-14.5-11.5c-2.7-11.4-5.4-22.9-6.8-34.5c-1-8.8,0.3-17.9,0.2-26.9c0-3.8-1.3-7.6-1.7-11.5
				c-0.3-2.7-0.1-5.5,0-8.3c0-1.7,0.3-3.3,0.2-5c-0.3-4.6-0.8-9.2-1.1-13.7c-0.3-4.9-1.4-5.6-6.1-4.6
				C470.1,270.8,458.5,273.2,447.7,275.6z M118.1,435.7c1.3,7.3,3.2,18.4,5.2,29.4c0.2,1,1.7,1.8,2.5,2.6c0.8-0.9,1.7-1.7,2.4-2.7
				c2.7-4.1,5.1-8.4,8.2-12.2c4.1-5.1,8.7-9.7,13-14.6c5.2-6,11.8-11,14.6-18.9c0.3-0.8,1.5-1.3,2.1-2.1c3.2-3.8,7.6-7.1,9.2-11.5
				c3.3-8.9,9.5-15,16.2-21.1c2.4-2.2,3.9-5.6,5.7-8.5c2.7-4.4,5.2-9,8.1-13.2c2.2-3.1,5.1-5.7,7.4-8.7c3.6-4.6,3.2-6.9-2.4-8
				c-7.3-1.5-14.8-1.9-22.2-2.7c-1.8-0.2-3.5-0.3-5.3-0.7c-3.1-0.8-6.2-1.7-9.3-2.6c-2.5-0.7-5.3-0.9-7.5-2
				c-4.7-2.4-8.9-6.3-13.9-7.6c-12.9-3.3-25-8.1-36.6-14.7c-3.1-1.8-5.9-1.3-7.6,2.1c-2.5,5.1-6.8,9.8-2.9,16.1
				c0.5,0.7,0.1,2,0.2,2.9c0.7,6.7,1.1,13.5,2.2,20.2c2.1,13.3,6.5,26.3,4.6,40.2c-0.5,3.7-0.4,8,1.1,11.2
				C117,416.1,118.2,423.8,118.1,435.7z M110.9,128.4c-2.3,3.4-4.2,5.6-5.3,8.2c-1.1,2.5-2.1,5.3-1.9,7.9c0.8,9.3,2.2,18.6,3.1,27.9
				c0.2,1.7-1.3,3.4-1.5,5.2c-0.6,4.4-1,8.7-1.4,13.1c-0.1,1.1,0.3,2.4-0.1,3.3c-2.8,6.7-5.3,13.4,1.4,19.4c0.1,0.1,0,0.3-0.1,0.9
				c-5,1.1-4.2,4.5-2.9,8.3c2.8,8.2,3.2,16.1-1.7,23.9c-1.5,2.4-0.6,6.1-1.2,9.2c-1.1,5.8,3.5,8.1,7.1,9.1c1.9,0.5,5.7-3.1,7.5-5.7
				c4.7-6.4,8.8-13.3,13.3-19.9c0.8-1.2,2.2-2,3.3-2.9c2.2-1.9,4.7-3.7,6.7-5.9c11.1-12.7,22.1-25.4,32.9-38.2c3-3.5,5.5-7.4,8-11.3
				c0.7-1.1,1.1-3.4,0.5-4.1c-3.3-4-6.5-8.5-10.7-11.5c-6.8-4.7-15.2-6-21.7-12.2c-6.9-6.6-15.7-11-23.7-16.4
				C118.4,133.9,114.5,131,110.9,128.4z M444.4,232.1c3.8,0,8.4,1.4,11.4-0.3c8.7-4.7,18.5-4.7,27.6-7.5c3.5-1.1,4.7-2.7,4.3-5.9
				c-0.5-4.1-1-8.2-1.6-12.4c-1.2-8.5-1.8-17.2-4-25.4c-2.1-8.1-0.5-17.4-7.4-24c-0.7-0.7-0.4-2.3-0.8-3.3
				c-1.7-4.3-3.2-8.7-5.3-12.8c-1.4-2.7-3.8-3.7-5.2,0.2c-2.5,6.7-7.7,12.4-6.7,20.2c0.1,1-0.9,2.1-1.3,3.1c-0.7,2-1.7,3.9-2.1,5.9
				c-1.8,8.7-2.5,17.8-5.5,26c-2.7,7.3-3.1,14.5-3.3,21.9C444.3,222.6,444.4,227.2,444.4,232.1z"/>
			<path d="M532.2,243.8c-1.4-3.7-2.9-7.3-4.2-11c-0.4-1.1-0.2-2.5-0.2-3.7c0.4-6.4,0.9-12.8,1.2-19.2c0.1-2.5,0.2-5,0-7.4
				c-0.5-9.9-1.4-19.8-1.4-29.8c0-5.9,1.2-11.8,1.9-17.7c0.2-2,1.3-4.1,0.7-5.8c-3.7-12.6,3.7-23.1,6.2-34.5c1.2-5.3,3.5-9.8,8-13.3
				c3-2.3,5.8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,8.8-13.5,10.2
				c-2.1,0.5-4.4,1.3-5.8,2.7c-4.7,5-10.2,3.8-15.8,2.6c-5.6-1.3-11-3.3-16.7-4.1c-11.8-1.5-19.2-8.9-27-16.9
				c-9.1-9.4-10.4-21.9-15.8-32.7c-1.6-3.1-2.6-6.5-4.3-9.5c-4.8-8.8-5.3-18.8-7.7-28.2c-1.2-4.9-2-10-2.9-15
				C530.9,244.2,531.6,244,532.2,243.8z"/>
			<path d="M100.4,253.4c1.6-1.3,2.9-2.9,3.6-2.7c1.2,0.4,2.7,1.8,2.9,2.9c0.1,0.9-1.5,2.1-2.3,3.2
				C103.4,255.9,102.2,254.9,100.4,253.4z"/>
		</g>
	</g>
</g>
</svg>

Removing the XML header makes the second SVG work as a component:

<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 viewBox="0 0 665 638" style="enable-background:new 0 0 665 638;" xml:space="preserve">
<g id="eozbYU_1_">
	<g>
		<g>
			<path d="M447.7,275.6c-0.8,2.2-0.9,4-1.8,4.6c-4.2,2.8-4.4,6.7-4,11c0.5,4.9,1,9.9,1.2,14.8c0.2,5.5,1,10.5,4,15.6
				c1.8,3.1,1,8.7-0.4,12.5c-0.9,2.4-1.5,3.9-0.3,6.2c2.8,5.4,2.4,8.5-1.4,11.4c-5.5,4.1-10.7,4.2-15,0.5c-2-1.7-4.2-3.3-6.3-4.8
				c-4.1-2.8-7.3-6-7.2-11.7c0-2.6-1.6-5.3-2.5-8c-0.6,0-1.2,0-1.9,0c-1.6,3-3.1,6-4.8,8.9c-1.3,2.1-2.6,4.3-4.4,5.9
				c-3.2,2.7-5.8,5.3-6.1,9.8c-0.1,1.3-1.3,2.6-2.3,3.7c-2.3,2.8-4.8,5.4-7.2,8.1c-0.4,0.5-0.9,1-1.4,1.4
				c-4.7,3.5-9.1,7.7-14.2,10.2c-5.8,2.9-12.2,5-18.6,6.2c-6,1.1-12.3,0.5-18.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-0.5c7.4-13.7-5.8-17.9-12-24.9c-7.1-8-15.4-14.9-23.4-22.1c-8.2-7.4-16.1-14.8-27-19.1
				c-6.8-2.7-12.3-9.9-17.2-16c-4.6-5.7-0.5-17.9,6.3-21.2c6.9-3.3,13.7-3.1,20.5,1c7.9,4.8,15.1,10.6,22.4,16.3
				c11.5,8.9,22.8,18,33.2,28.1c4.3,4.2,6.8,3.6,8.6-2c2.2-6.8,3.5-13.8,5.6-20.7c0.8-2.6,2.8-4.9,3.8-7.5c1.3-3.4,2.1-7,3.1-10.6
				c2.4-8.5,10.3-11.5,16.9-15.1c5-2.7,11.8,4.9,8.9,10.9c-6.5,13.3-4.8,28.3-9.9,41.8c-1.9,5.1-3.9,10.2-6.3,15.1
				c-4.1,8.7-2.5,16,5.7,23c10.3,8.9,20.8,17.6,31.1,26.5c5.4,4.6,10.2,9.9,15.7,14.3c3.8,3.1,8.3,5.4,12.6,7.9
				c6.4,3.8,12.8,7.7,19.4,11.3c1.1,0.6,3.3,0.1,4.5-0.7c2.7-1.6,5.2-3.6,7.6-5.6c4.8-3.9,20.5-5.8,25.8-2.5c1.7,1.1,2.2,4.2,3,6.4
				c0.7,2.1,0.4,4.7,1.6,6.5c4.2,6.5,3,11.1-4.1,14.4c-7.6,3.6-8.2,6.7-1.4,12c4.1,3.2,7,6.1,7.6,11.7c0.3,2.8,4.3,5.1,5.6,8.1
				c2,4.7,3.3,9.8,4.5,14.8c0.1,0.5-2.1,2-3.3,2.2c-4.5,0.5-8.9,0.8-13.4,0.7c-2.9,0-4.6-1.3-6.2-4.4c-2.4-4.5-6.8-7.9-10.5-11.6
				c-1.4-1.4-3.1-2.4-4.7-3.7c-3.3-2.8-7.1-2.2-9.5,1c-4.3,5.6-8.8,11-13.3,16.4c-4.1,4.8-8.2,9.6-12.4,14.2
				c-6.3,6.8-12.9,13.4-19.1,20.3c-8.4,9.3-16.5,18.8-24.8,28.2c-2.2,2.5-1.8,4,0.4,6.7c6.8,8.2,16.6,9.8,25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7,0.2,1,0.1
				c11-2.8,19.1,3.4,25,10.5c4.2,5.1,12.2,10.5,8,19.8c-0.2,0.5-0.2,1.4,0,1.9c1.4,4,2.2,8.5,4.6,11.8c7,9.5,7.6,21.4,12.3,31.7
				c0.5,1.2,0.6,2.6,0.7,3.9c1.4,12.9,2.6,25.9,4.3,38.8c0.7,5.1,3.1,10,3.5,15c0.7,10.6,0.6,21.3,0.7,32c0,4.8-0.3,9.7-0.2,14.5
				c0,3.6,0.1,6.9-3.6,9.2c-0.8,0.5-1.4,3-0.8,3.8c4.2,6.1,2.5,12.8,2.5,19.4c0,0.7-0.5,1.6-0.2,1.9c5.3,6.7,1,15.1,4.2,22.4
				c3,7,3.7,15,5.3,22.6c0.3,1.4,0.5,3.5-0.2,4.4c-3.4,4.1-2,7.6-0.4,12.1c3.1,8.5-4.4,17.1-13.5,16.6c-2-0.1-4-0.6-6-0.6
				c-11.4-0.4-11.8-0.3-14.5-11.5c-2.7-11.4-5.4-22.9-6.8-34.5c-1-8.8,0.3-17.9,0.2-26.9c0-3.8-1.3-7.6-1.7-11.5
				c-0.3-2.7-0.1-5.5,0-8.3c0-1.7,0.3-3.3,0.2-5c-0.3-4.6-0.8-9.2-1.1-13.7c-0.3-4.9-1.4-5.6-6.1-4.6
				C470.1,270.8,458.5,273.2,447.7,275.6z M118.1,435.7c1.3,7.3,3.2,18.4,5.2,29.4c0.2,1,1.7,1.8,2.5,2.6c0.8-0.9,1.7-1.7,2.4-2.7
				c2.7-4.1,5.1-8.4,8.2-12.2c4.1-5.1,8.7-9.7,13-14.6c5.2-6,11.8-11,14.6-18.9c0.3-0.8,1.5-1.3,2.1-2.1c3.2-3.8,7.6-7.1,9.2-11.5
				c3.3-8.9,9.5-15,16.2-21.1c2.4-2.2,3.9-5.6,5.7-8.5c2.7-4.4,5.2-9,8.1-13.2c2.2-3.1,5.1-5.7,7.4-8.7c3.6-4.6,3.2-6.9-2.4-8
				c-7.3-1.5-14.8-1.9-22.2-2.7c-1.8-0.2-3.5-0.3-5.3-0.7c-3.1-0.8-6.2-1.7-9.3-2.6c-2.5-0.7-5.3-0.9-7.5-2
				c-4.7-2.4-8.9-6.3-13.9-7.6c-12.9-3.3-25-8.1-36.6-14.7c-3.1-1.8-5.9-1.3-7.6,2.1c-2.5,5.1-6.8,9.8-2.9,16.1
				c0.5,0.7,0.1,2,0.2,2.9c0.7,6.7,1.1,13.5,2.2,20.2c2.1,13.3,6.5,26.3,4.6,40.2c-0.5,3.7-0.4,8,1.1,11.2
				C117,416.1,118.2,423.8,118.1,435.7z M110.9,128.4c-2.3,3.4-4.2,5.6-5.3,8.2c-1.1,2.5-2.1,5.3-1.9,7.9c0.8,9.3,2.2,18.6,3.1,27.9
				c0.2,1.7-1.3,3.4-1.5,5.2c-0.6,4.4-1,8.7-1.4,13.1c-0.1,1.1,0.3,2.4-0.1,3.3c-2.8,6.7-5.3,13.4,1.4,19.4c0.1,0.1,0,0.3-0.1,0.9
				c-5,1.1-4.2,4.5-2.9,8.3c2.8,8.2,3.2,16.1-1.7,23.9c-1.5,2.4-0.6,6.1-1.2,9.2c-1.1,5.8,3.5,8.1,7.1,9.1c1.9,0.5,5.7-3.1,7.5-5.7
				c4.7-6.4,8.8-13.3,13.3-19.9c0.8-1.2,2.2-2,3.3-2.9c2.2-1.9,4.7-3.7,6.7-5.9c11.1-12.7,22.1-25.4,32.9-38.2c3-3.5,5.5-7.4,8-11.3
				c0.7-1.1,1.1-3.4,0.5-4.1c-3.3-4-6.5-8.5-10.7-11.5c-6.8-4.7-15.2-6-21.7-12.2c-6.9-6.6-15.7-11-23.7-16.4
				C118.4,133.9,114.5,131,110.9,128.4z M444.4,232.1c3.8,0,8.4,1.4,11.4-0.3c8.7-4.7,18.5-4.7,27.6-7.5c3.5-1.1,4.7-2.7,4.3-5.9
				c-0.5-4.1-1-8.2-1.6-12.4c-1.2-8.5-1.8-17.2-4-25.4c-2.1-8.1-0.5-17.4-7.4-24c-0.7-0.7-0.4-2.3-0.8-3.3
				c-1.7-4.3-3.2-8.7-5.3-12.8c-1.4-2.7-3.8-3.7-5.2,0.2c-2.5,6.7-7.7,12.4-6.7,20.2c0.1,1-0.9,2.1-1.3,3.1c-0.7,2-1.7,3.9-2.1,5.9
				c-1.8,8.7-2.5,17.8-5.5,26c-2.7,7.3-3.1,14.5-3.3,21.9C444.3,222.6,444.4,227.2,444.4,232.1z"/>
			<path d="M532.2,243.8c-1.4-3.7-2.9-7.3-4.2-11c-0.4-1.1-0.2-2.5-0.2-3.7c0.4-6.4,0.9-12.8,1.2-19.2c0.1-2.5,0.2-5,0-7.4
				c-0.5-9.9-1.4-19.8-1.4-29.8c0-5.9,1.2-11.8,1.9-17.7c0.2-2,1.3-4.1,0.7-5.8c-3.7-12.6,3.7-23.1,6.2-34.5c1.2-5.3,3.5-9.8,8-13.3
				c3-2.3,5.8-3.8,9.5-2c1.6,0.8,3.5,1.3,5.2,1.6c4.8,0.6,7.7,2.8,7.8,8c0,0.8,0.1,1.9,0.6,2.4c5.7,5.8,4,13,3.7,19.9
				c-0.8,20.6-5.6,40.9-3.9,61.6c0.9,10.9,2.4,21.8,2.6,32.7c0.1,6.5,1.1,12.4,2.6,18.7c2.1,8.9,2,18.3,3.3,27.5
				c0.4,3,2.3,5.8,3.5,8.7c2.8,6.5,5.8,12.9,8.3,19.5c2.6,6.8,8.8,9.7,14.2,13.3c1.3,0.9,4,0.5,5.7-0.1c8.2-3.1,12.5-9.3,14.1-17.8
				c1.2-6.6,2.5-13.3,4.1-19.8c0.6-2.7,2.7-5,3.1-7.7c0.9-5.8,0.3-12,1.8-17.6c1.5-5.8,1.9-11.4,1.5-17.4
				c-0.6-10.6,0.1-21.3-0.6-31.9c-0.7-11-2.4-22-3.9-32.9c-1.4-10.4-3-20.9-5-31.2c-1.2-6.1-3.6-11.9-5-18c-2-8.9-2.9-18-5.4-26.8
				c-2.1-7.4-3.9-14.9-7.2-22.1c-3.4-7.5-4.9-16.7-1.4-25.1c1.8-4.4,13.1-6.1,18.1-2c6.1,5,11,11.3,16.4,17.1
				c0.4,0.5,0.6,1.8,0.2,2.3c-3.2,3.9-1.2,7.9-0.4,11.9c2.1,10.5,4.3,21,6.5,31.6c0.1,0.3,0,0.8,0.2,1c6,6.5,6.1,15.4,9,23.1
				c0.4,1.1,1.3,2.2,1.2,3.2c-1.3,8.9,3.1,17,4,25.5c1.1,9.7,3.6,19.2,5.1,28.8c0.6,4.2,0.5,8.5,0.4,12.8
				c-0.4,12.2-1.6,24.4-1.3,36.6c0.3,10.3-2.5,19.8-4.8,29.5c-0.4,1.6-0.2,3.4-0.1,5.1c0.1,2.7,1.5,6,0.4,8.1
				c-3,5.7-2.2,11.6-2.9,17.4c-0.6,4.8-2.7,9.3-4.3,14c-0.3,0.9-1.5,1.7-1.4,2.5c0.7,9.4-6,15.3-10.6,22c-3.2,4.6-7.4,8.8-13.5,10.2
				c-2.1,0.5-4.4,1.3-5.8,2.7c-4.7,5-10.2,3.8-15.8,2.6c-5.6-1.3-11-3.3-16.7-4.1c-11.8-1.5-19.2-8.9-27-16.9
				c-9.1-9.4-10.4-21.9-15.8-32.7c-1.6-3.1-2.6-6.5-4.3-9.5c-4.8-8.8-5.3-18.8-7.7-28.2c-1.2-4.9-2-10-2.9-15
				C530.9,244.2,531.6,244,532.2,243.8z"/>
			<path d="M100.4,253.4c1.6-1.3,2.9-2.9,3.6-2.7c1.2,0.4,2.7,1.8,2.9,2.9c0.1,0.9-1.5,2.1-2.3,3.2
				C103.4,255.9,102.2,254.9,100.4,253.4z"/>
		</g>
	</g>
</g>
</svg>
@driesvints
Copy link
Member

Tbvh I don't know I want to support icons which have xml headers. Are they needed at all? To me it seems like it's an obsolete way of defining SVG icons.

@simensen
Copy link
Author

If you're writing SVG by hand, sure, maybe you don't need to worry about it. However, this generated by a file I exported as SVG by Illustrator. It might be possible to control that export plugin but having to know/remember to go in and remove something from a standard-ish graphics tool like Illustrator doesn't seem like the right call.

The problem is, it wasn't immediately obvious what was wrong or why it was a problem for some SVG files and not others. Took me a bit to see the only difference was the files that had problems had the <?xml preamble.

For my part, supporting this case could be removing ^<\?xml.+?\?> when the file is read and written into the component file. If you're not opposed to trying it out, I could even try implementing it to see if it works better/as expected.

TL;DR: You're not wrong; might be unneeded in some cases with some tools. The fact that some tools do add this automatically and it isn't obvious from the outside that this is going to cause an issue until it does makes me think something should be done to help people out here.

@simensen
Copy link
Author

I did a quick bit of extra research on this and found this article that seems to summarize what some of the other material says about this bit of XML prolog:

Using an SVG as an independent graphic
Keep the XML declaration ( <?xml … ) just in case. In my tests it wasn’t necessary, but the consensus from my research is that it is advisable.

Using an SVG “inline” with HTML code on a webpage
Remove the XML declaration ( <?xml … )

So, it does seem like it could be considered safe to strip the <?xml ... in all cases or only in cases where the SVG content is being inlined. I've only used this tool to work with the inline SVG case, is it safe to assume it's always going to be inline? If so, if the SVG content is always copied/cached and have this info stripped in the copy, things would probably work out well. That way, if those same SVG are used as external assets as well, they can keep the <?xml ... bits in case they are important for being used as an independent graphic.

I'd be happy to experiment with this if you're not entirely opposed to introducing this support to this package. :)


image

@driesvints driesvints linked a pull request Feb 10, 2021 that will close this issue
@driesvints
Copy link
Member

Fixed in #116. Will be in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants