Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: "Download as HTML" recommends using a data: URL, which is restricted in Dash>=2.15.0 #4559

Open
ndrezn opened this issue Mar 27, 2024 · 1 comment
Assignees

Comments

@ndrezn
Copy link
Member

ndrezn commented Mar 27, 2024

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

@ndrezn
Copy link
Member Author

ndrezn commented Mar 27, 2024

Related: plotly/dash#2764, which discusses allowing data: attribute in certain cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant