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

bugfix: [7854] Update SVG test when converting svg to base64 #7857

Merged
merged 4 commits into from
Oct 18, 2021

Conversation

zero41120
Copy link
Contributor

@zero41120 zero41120 commented Oct 11, 2021

Description of change

#7460 and its merge request #7478 suppose to fix loader loading SVG issue.
#7478 only fix the detection, but the conversion RegExp was not update accordingly.
This pull request uses the same RegExp when checking again in the SVG to base 64.

Pre-Merge Checklist
  • Tests and/or benchmarks are included
  • Lint process passed (npm run lint)
  • Tests passed (npm run test)

@bigtimebuddy
Copy link
Member

Thank you! One small thing, could you please make a test for this so we don't repeat this error again?

@zero41120
Copy link
Contributor Author

@bigtimebuddy
Test added.

  • Add SVG with XML Prolog
  • Loads that SVG as raw string
  • Expect raw string starts with <?xml
  • Expect image loaded properly with size 48 x 48
    image

@bigtimebuddy bigtimebuddy requested a review from a team October 15, 2021 15:55
@bigtimebuddy bigtimebuddy linked an issue Oct 15, 2021 that may be closed by this pull request
@bigtimebuddy bigtimebuddy merged commit 234f39d into pixijs:dev Oct 18, 2021
@bigtimebuddy
Copy link
Member

@zero41120 thank you for this bug fix and congrats on the bounty. Please submit your invoice here to claim the bounty.

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 this pull request may close these issues.

PIXI.Loader cannot load SVG with XML prolog
3 participants