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

Parsing breaks when comments exists before <!DOCTYPE.. in svg file. #2532

Open
henninghall opened this issue Nov 14, 2024 · 3 comments · May be fixed by #2533
Open

Parsing breaks when comments exists before <!DOCTYPE.. in svg file. #2532

henninghall opened this issue Nov 14, 2024 · 3 comments · May be fixed by #2533
Labels
Missing info The user didn't precise the problem enough Missing repro This issue need minimum repro scenario

Comments

@henninghall
Copy link

henninghall commented Nov 14, 2024

Description

Comments like <!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> might be inserted into the svg file. When this is the case the SvgUri breaks throwing the error Cannot read property 'push' of null

Steps to reproduce

  1. Insert
<!-- comment  -->
<!DOCTYPE>

into a svg file.
2. Make the svg available on an URI.
3. render <SvgUri uri={URI} />

Snack or a link to a repository

SVG version

15.9.0

React Native version

0.76.1

Platforms

iOS

JavaScript runtime

Hermes

Workflow

Expo Dev Client

Architecture

Fabric (New Architecture)

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

@github-actions github-actions bot added Missing repro This issue need minimum repro scenario Missing info The user didn't precise the problem enough labels Nov 14, 2024
Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

Copy link

github-actions bot commented Nov 14, 2024

Hey! 👋

It looks like you've omitted a few important sections from the issue template.

Please complete Snack or a link to a repository section.

@henninghall henninghall changed the title SvgUri breaks when comments exisits in svg file. <-- SvgUri breaks when comments exists before <!DOCTYPE.. in svg file. Nov 14, 2024
@henninghall henninghall changed the title SvgUri breaks when comments exists before <!DOCTYPE.. in svg file. Parsing breaks when comments exists before <!DOCTYPE.. in svg file. Nov 14, 2024
henninghall added a commit to henninghall/react-native-svg that referenced this issue Nov 14, 2024
@henninghall henninghall linked a pull request Nov 14, 2024 that will close this issue
4 tasks
@henninghall
Copy link
Author

henninghall commented Nov 14, 2024

made a pr with a fix #2533

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing info The user didn't precise the problem enough Missing repro This issue need minimum repro scenario
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant