Aleksi44 / wagtailsvg

Wagtail + SVG
https://pypi.org/project/wagtailsvg/
GNU General Public License v3.0
35 stars 24 forks source link

HTML escape SvgChooserBlock output #14

Closed vasilty closed 2 years ago

vasilty commented 2 years ago

With this change in wagtail https://github.com/wagtail/wagtail/commit/c564c2949460557cde58207ddc34eb4807eeede2, which constituted wagtail versions 2.11.8, 2.12.5 and 2.13.2 (here is a release note for 2.13.2 https://github.com/wagtail/wagtail/commit/74e3c1764f059fdbf98ffd92b774ad5e6c19dc68), the complete SvgChooserBlock output is escaped when rendered and thus instead of an expected image one would literally see an image HTML tag on the page like <img src='/media/svg-example-1.svg' alt='svg-example-1'>.

This PR fixes the unwanted behaviour.