Skip to content

Commit

Permalink
fix safe preview in ExperimentalLayout
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp committed Oct 30, 2023
1 parent 62feafb commit a0bb459
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/components/TreeView.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,9 @@ export const TableView = ({ mime, body, cell_id, persist_js_state }) => {
</table>`
}

export let DivElement = ({ cell_id, style, classname, children, persist_js_state = false }) => {
const mimepair_output = (pair) => html`<${SimpleOutputBody} cell_id=${cell_id} mime=${pair[1]} body=${pair[0]} persist_js_state=${persist_js_state} />`
export let DivElement = ({ cell_id, style, classname, children, persist_js_state = false, sanitize_html = true }) => {
const mimepair_output = (pair) =>
html`<${SimpleOutputBody} cell_id=${cell_id} mime=${pair[1]} body=${pair[0]} persist_js_state=${persist_js_state} sanitize_html=${sanitize_html} />`

return html`<div style=${style} class=${classname}>${children.map(mimepair_output)}</div>`
}

0 comments on commit a0bb459

Please sign in to comment.