mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-24 16:57:30 +00:00
- Clear our non-breaking-space characters
- These can break SVG rendering in the browser
- Ref: https://github.com/inventree/InvenTree/pull/11655
(cherry picked from commit cead09bcd8)
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
1 parent
d1354fc147
commit
913fe854c9
1 file changed
+4
@@ -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
|
||||
Reference in new issue
Block a user