backstage / mkdocs-techdocs-core

The core MkDocs plugin used by Backstage's TechDocs as a wrapper around multiple MkDocs plugins and Python Markdown extensions
Apache License 2.0
87 stars 64 forks source link

Non Breaking Space (NBSP) in SVG breaks image rendering #49

Closed trietsch closed 1 year ago

trietsch commented 2 years ago

I regularly create SVGs using diagrams.net, which often includes non breaking space characters (shown by IDEs as NBSP). When these characters occur somewhere in the SVG, the entire image is not rendered.

MkDocs does not have this issue, when running mkdocs serve locally, the image is rendered properly.

jankeesvanandel commented 2 years ago

I have the same issue. It seems that there is an error transforming the SVG into a data-URL. When I render the SVG directly in the browser, there is no issue, but when I open the data-URL that is generated in the Backstage page, I get an error like this: This page contains the following errors: error on line 4 at column 16398: Encoding error

And the character at that location is indeed an NBSP.

vierno commented 2 years ago

I've had this problem with other unicode characters as well (ç and ã).

iamEAP commented 2 years ago

Hey y'all. Anyone still experiencing this with a version of @backstage/plugin-techdocs above v1.1.1?

Thinking it may have been resolved by https://github.com/backstage/backstage/pull/11054

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.