glyphr-studio / Glyphr-Studio-2

Glyphr Studio v1 is more than a decade old. V2 is here to save the day.
https://www.glyphrstudio.com/v2
116 stars 14 forks source link

SVG Export: Characters are not escaped properly #153

Closed ThePaSch closed 7 months ago

ThePaSch commented 7 months ago

Describe the bug & what the expected behavior should be: When exporting to SVG, certain characters are not escaped properly in <glyph> elements' unicode properties, leading to parse errors when trying to open the exported SVG in any software. For example, a " glyph will be exported as <glyph glyph-name="Quotation_mark" unicode=""" />, or a < glyph as <glyph glyph-name="Less-than_sign" unicode="<" />; neither are valid SVG and will fail to open in any SVG editor.

The SVG export routine should escape sensitive characters that are part of the SVG syntax; for instance, " should be escaped as &quot;, and < as &lt;.

Steps to reproduce the bug:

  1. Export any font that provide glyphs for protected SVG characters as SVG.
  2. Open the resulting SVG in any text editor; the protected characters are not escaped.
mattlag commented 7 months ago

Confirmed - this is a bug, thank you for filing it!

mattlag commented 7 months ago

This was just fixed in 2.0.1!