Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Sanitizer removes "title" elements from SVG #1267

Closed
brianquinlan opened this issue May 1, 2019 · 1 comment
Closed

Sanitizer removes "title" elements from SVG #1267

brianquinlan opened this issue May 1, 2019 · 1 comment

Comments

@brianquinlan
Copy link

Here is an example:
https://raw.githubusercontent.com/google/pybadges/master/tests/golden-images/build-failure.svg?sanitize=true

The original image has content like:

<svg height="20" width="82.30000000000001" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Error in foo.py, line 3</title>
<linearGradient...

The sanitized version:

+ <?xml version="1.0" encoding="utf-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="20" width="82.30000000000001">
- <title>Error in foo.py, line 3</title>
<linearGradient...

I think that title elements should be safe and can be whitelisted.

@kivikakk
Copy link
Contributor

kivikakk commented May 1, 2019

👋 Please reach out to our support team with your bug report — this repository is only monitored by maintainers of the gem. Thanks!

@kivikakk kivikakk closed this as completed May 1, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants