svg / svgo

⚙️ Node.js tool for optimizing SVG files
https://svgo.dev/
MIT License
21.03k stars 1.39k forks source link

Preserve all white space within foreignObject elements. #2064

Open johnkenny54 opened 3 months ago

johnkenny54 commented 3 months ago

This PR modifies SVGO to always preserve white space within <foreignObject> elements. In general there is no way to know the semantics of the <foreignObject> content, so all white space within the element is preserved.

The following changes were made:

Resolves #1678, resolves #1473.

rnwst commented 2 weeks ago

Thanks for this PR. If all it does is to preserve white space within foreignObject elements, then it does not address #1728. #1728 is about invalid self-closing tags, not preserving whitespace.