Hi @GDelevoye and welcome to the Dash community
That’s an interesting work-around, but here is how you could get a report like that displayed in an app without having to use dangerously_allow_html
:
report = html.Div(
[
html.H1("Query Report"),
html.Div("Content blabla"),
dash_table.DataTable(
columns=[{"name": i, "id": i} for i in df.columns],
data=df.to_dict("records"),
page_size=10,
),
]
)
app.layout = report
Also, now with the release of Dash v 1.21.0, there is an option to include html in markdown in a dataTable. (But note that it has the same security risks as your solution)
See some examples of how to use html in the dataTable here.