Add DOCTYPE as valid svg format #6687

Closed
opened 2025-11-02 07:03:54 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @kdumontnu on GitHub (Jan 13, 2021).

Now that we support rendering svgs (!) we should add doctype as a valid svg attribute.

Consider the following svg file which currently does not get assigned the svg mime type.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" baseProfile="full" xmlns="http://www.w3.org/2000/svg">
   <rect width="300" height="100" style="fill:rgb(0,0,255);stroke-width:3;stroke:rgb(0,0,0)" />
</svg>
Originally created by @kdumontnu on GitHub (Jan 13, 2021). Now that we support rendering svgs (!) we should add doctype as a valid svg attribute. Consider the following svg file which currently does not get assigned the svg mime type. ``` <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg version="1.1" baseProfile="full" xmlns="http://www.w3.org/2000/svg"> <rect width="300" height="100" style="fill:rgb(0,0,255);stroke-width:3;stroke:rgb(0,0,0)" /> </svg> ```
GiteaMirror added the type/proposal label 2025-11-02 07:03:54 -06:00
Author
Owner

@kdumontnu commented on GitHub (Jan 13, 2021):

@jtran FYI

@kdumontnu commented on GitHub (Jan 13, 2021): @jtran FYI
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6687