-
Notifications
You must be signed in to change notification settings - Fork 19
Description
When exporting to svg, embedded icons will still be referenced by remote URL and not be embedded into the svg.
With that parts of the svg will not be shown in and the exported svg will not display as expected when offline or the original source gets moved. In most cases browsers will refuse to load the referenced content.
In addition, when opening the svg, some software will request the images, e.g. inkscape, others like gimp or geeqie will not.
This could also be considered a privacy or security concern in some environments. When the documentation is meant for disaster recovery this can be especially problematic.
To Reproduce
- embed a drawio diagram containing remote icons, e.g. via
.. drawio-figure:: img/example.drawio - build the sphinx html export
- open the html from a file-url
- in this example: trees are missing from the diagram
This can also be reproduced manually:
drawio example.drawio -x -f svg --embed-svg-images -o embed.svg
drawio example.drawio -x -f svg -o no-embed.svg
grep -c https://cdn0.iconfinder.com/ no-embed.svg
1
See screenshot below.
Expected behaviour
Diagrams embedded in a Sphinx html exports are displayed correctly when offline and do not create https requests to 'random' hosts on the Internet.
Setup Information
- OS: Linux Arch
- Python: 3.13.7
- Version: sphinxcontrib-drawio==0.0.17
Additional context
- example.drawio
- svg with icons being embedded - should display here correctly:
- svg with external links - should not display correctly, because of browser security, unless you open it directly.
