You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 3, 2024. It is now read-only.
import dash
import dash_core_components as dcc
import dash_html_components as html
app = dash.Dash()
app.layout = html.Div(
children=[
dcc.Markdown(
"""
<p>Some text above</p>
<img src="some_path.png">
<p>Some text below</p>
""",
dangerously_allow_html=True,
)
]
)
if __name__ == "__main__":
app.run_server(debug=True)
When upgrading to dash==1.8 most/all of the Markdown content is not rendered.
After some debugging it turned out that going from dash==1.7 to dash==1.8, we need to have e.g. <img ... /> instead of <img ... > in the markdown. The closing slash is necessary only on dash==1.8, not dash==1.7.
Expected behavior
dash==1.8 accepting the same Markdown input as dash==1.7. Not using a closing / on img tags is also quite common, e.g. the examples on MDN web docs do not have a closing /.
Using the common Python html sanitizer bleach also removes the closing /.