THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Test handling of SVG on git services.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Edgar Bonet dee93754e3 Link to issues on GitHub and GitLab 2 years ago
README.md Link to issues on GitHub and GitLab 2 years ago
image-nojs.svg Add a second image with no JavaScript 2 years ago
image.svg Use an image with embedded JavaScript 2 years ago

README.md

Below are two SVG images. The first one has embedded JavaScript:

(this is the alt text of the first image) (this is the alt text of the second image)

On GitHub, Gogs and Gitea, the alt texts are displayed instead of the images. Unlike Firefox, Chromium also displays broken-image icons.

When clicking on the alt texts, Gogs and Gitea display the raw source of the images (the images served as text/plain). GitHub instead displays a “blob” page in “rendered” view, with the image embedded as a data URL from an iframe. Although the JavaScript has not been removed from the first image, it is not interpreted by the browser. That blob page has buttons for switching between the rendered and source blob views, and a link to the raw file (served as text/plain from raw.githubusercontent.com).

Tests:

The issue has been reported: