2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-04-16 16:28:47 +00:00

Fix for SVG sanitizing (#11742)

- Clear our non-breaking-space characters
- These can break SVG rendering in the browser
- Ref: https://github.com/inventree/InvenTree/pull/11655
This commit is contained in:
Oliver
2026-04-14 12:48:15 +10:00
committed by GitHub
parent a3584bd452
commit cead09bcd8

View File

@@ -345,4 +345,8 @@ def sanitize_svg(
link_rel=None,
)
# Replace non-breaking spaces with regular spaces to prevent SVG rendering issues
for nbsp in [' ', ' ']:
cleaned = cleaned.replace(nbsp, ' ')
return cleaned