plotly.py
plotly.py copied to clipboard
Docs: "Download as HTML" recommends using a `data:` URL, which is restricted in Dash>=2.15.0
In: https://plotly.com/python/interactive-html-export/
we have an example which recommends:
html.A(
html.Button("Download as HTML"),
id="download",
href="data:text/html;base64," + encoded,
download="plotly_graph.html"
)
However, data: URLs are restricted in 2.15.0. We can wait until they're unrestricted, or, better off just changing this example to recommend using dcc.Download instead.
Originally reported in: https://community.plotly.com/t/dangerous-link-detected-when-running-dash-example/83356
Related: https://github.com/plotly/dash/issues/2764, which discusses allowing data: attribute in certain cases.