Hi,
I’m using a markodwn to display the content of a python dictionnary, the markdown content is updated via a callback. It’s working fine but the console is throwing a lot of warning about potential security risk because the markdown create code block with unescaped html :
react_devtools_backend.js:4026 One of your code blocks includes unescaped HTML. This is a potentially serious security risk.
I tried to set the dangerously_allow_html property to false or true, it didn’t change a thing, I tried to supply that setting directly to the highlight_config
but only the theme keywork is accepted…
I’m running out of idea. Here is my implementation :
dcc.Markdown(
'',
id = f"{name}_display",
dangerously_allow_html = False,
mathjax = False,
dedent = True
)
@callback(
Output(f"{name}_display", "children"),
Input(f"update_{name}_display", "n_clicks"),
Input("control_board_interval", "n_intervals")
)
def getDisplay(click, n_int):
markdown = (
f"Value of the {name} object\n"
"```python\n"
f"{pprint.pformat(obj, indent=4)}\n"
"```"
)
return markdown