plotly / dash

Data Apps & Dashboards for Python. No JavaScript Required.
https://plotly.com/dash
MIT License
21.39k stars 2.06k forks source link

Variable Path not accounting for HTML encoding #2360

Open BSd3v opened 1 year ago

BSd3v commented 1 year ago

Describe your context

async-dash                0.1.0a1
dash                      2.7.0
dash-bootstrap-components 1.2.1
dash-core-components      2.0.0
dash-daq                  0.5.0
dash-extensions           0.1.5
dash-html-components      2.0.0
dash-iconify              0.1.2
dash-loading-spinners     1.0.0
dash-mantine-components   0.11.0a2
dash-table                5.0.0

Describe the bug

Variable paths are not working when they have been altered with html encoding during request process. ie - /path/this is a test => /path/this%20is%20a%20test variable path = this%20is%20a%20test

Expected behavior

/path/this is a test => /path/this%20is%20a%20test variable path = this is a test

Please note, this is available within Flask to remove the html encoding

AnnMarieW commented 1 year ago

Thanks @BSd3v, it would be good to handle encoded urls. In the meantime, a workaround is to use unquote from urllib.parse library.

Here's and example https://github.com/AnnMarieW/dash-multi-page-app-demos/blob/main/multi_page_update_url_in_callback/pages/stocks.py

gvwilson commented 3 months ago

@BSd3v is this still a concern?

BSd3v commented 3 months ago

Yes, this is still an issue as of 2.17.1.

gvwilson commented 3 months ago

thanks, I'll bump it up