Closed RokeJulianLockhart closed 7 months ago
Hi @RokeJulianLockhart, the lack of <iframe>
support is a security feature to prevent bad actors from embedding malicious sites, however you can enable this to work by setting the securityLevel
to loose
and adding iframe
to the ALLOWED_TAGS
in the dompurifyConfig
in the Config
tab on mermaid.live:
{
"securityLevel": "loose",
"dompurifyConfig": {
"ALLOWED_TAGS": ["iframe"]
}
}
Here is a Mermaid live link demonstrating this (you may have to readd the "securityLevel": "loose"
option in the configuration tab):
https://github.com/mermaid-js/mermaid/issues/5469#issuecomment-2062953703
"securityLevel": "loose"
Many thanks.
Description
doesn't render in a
TD
flowchart
at https://mermaid.live/edit#pako:eNo1UE1vwjAM_StRzpTuskm0wDSJfR12AmmHZQc3MTQiaSrHXVch_vsM23x6evZ7tt9J2-RQV3of0mhbIFa7jemU1MOH0Uu_J4ioMtmV0S1zn6uyHMdxPqWBhwbnNsUSY4Ou3L36u-J98VW4t_vM4rS6XRit2HNAEb-kUXFSwAy2VY-QWT0jRejUtk1DcEiqSUAui-a6tEkkpChvhIEg9wkGazEgpYiMVCsYOPUBplrZ4PurvhjJM9YKO0tTz-iKiM5DrQ4TpWxTL73eWx4IC98Vf7BWIzZFlgDwf9t-CCFbQuzWT0I0YI9qh9-8LH9DWRv9qWc6Xp7wTiI8XXIzmluMYlIJdEBHo013lrnLqdups7piGnCmh94B48bDQcx0tYeQ8fwD1uCMUw. However, it renders at https://www.w3schools.com/html/tryit.asp.Steps to reproduce
Visit https://mermaid.live/edit#pako:eNo1UE1vwjAM_StRzpTuskm0wDSJfR12AmmHZQc3MTQiaSrHXVch_vsM23x6evZ7tt9J2-RQV3of0mhbIFa7jemU1MOH0Uu_J4ioMtmV0S1zn6uyHMdxPqWBhwbnNsUSY4Ou3L36u-J98VW4t_vM4rS6XRit2HNAEb-kUXFSwAy2VY-QWT0jRejUtk1DcEiqSUAui-a6tEkkpChvhIEg9wkGazEgpYiMVCsYOPUBplrZ4PurvhjJM9YKO0tTz-iKiM5DrQ4TpWxTL73eWx4IC98Vf7BWIzZFlgDwf9t-CCFbQuzWT0I0YI9qh9-8LH9DWRv9qWc6Xp7wTiI8XXIzmluMYlIJdEBHo013lrnLqdups7piGnCmh94B48bDQcx0tYeQ8fwD1uCMUw
Screenshots
Code Sample
Setup
firefox-125.0-1.fc40.x86_64.rpm
Suggested Solutions
Support the tag, if it's unsupported.
Additional Context
https://github.com/microsoft/vscode/issues/210604#issue-2249402570 might be relevant.