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 icons break due to comments in them #26882

Closed
1 of 3 tasks
fenilgmehta opened this issue Jan 30, 2024 · 1 comment · Fixed by #26901
Closed
1 of 3 tasks

SVG icons break due to comments in them #26882

fenilgmehta opened this issue Jan 30, 2024 · 1 comment · Fixed by #26901

Comments

@fenilgmehta
Copy link
Contributor

fenilgmehta commented Jan 30, 2024

Bug description

SVG icons which have Apache Licence comment and XML tag result in the icon getting broken.

Removing <?xml version="1.0" encoding="UTF-8"... from those SVGs fixes the issue.

The issue got introduced in #26857 for two SVGs (apache-pinot.svg and csv.svg), and there are others which are already broken since long (e.g. apache-hive.svg).

Even GitHub is not able to render those SVGs (https://github.com/apache/superset/pull/26857/files#diff-ea23e99cde474e10690a62f28be5e102bb78ed0cd1e39612e96f0f4f1d48d380)
image

How to reproduce the bug

  1. Visit https://superset.apache.org/
  2. Scroll down to Supported Databases section
  3. CSV and Apache Pinot SVGs are not getting rendered

Screenshots/recordings

image

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

Search <?xml version="1.0" encoding="UTF-8" in the full repository and we will find many other SVG files which could get broken in future if comment (<!-- ... -->) is added to them, or which are already broken (e.g. apache-hive.svg)

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
@fenilgmehta
Copy link
Contributor Author

@rusackas maybe you could help.

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.

1 participant