commit 5e430cf951748904a7a7285a92f576d2c6927ec3
parent ed42b84b3922a4a8a8253088a0d5a00b31c584a2
Author: Katja (ctucx) <git@ctu.cx>
Date: Sun, 26 Jan 2025 16:51:51 +0100
parent ed42b84b3922a4a8a8253088a0d5a00b31c584a2
Author: Katja (ctucx) <git@ctu.cx>
Date: Sun, 26 Jan 2025 16:51:51 +0100
templates: allow rendering of html in remarks (uhh, i know, i know)
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/templates.js b/src/templates.js @@ -1,6 +1,7 @@ +import { html } from 'lit-html'; +import { unsafeHTML } from 'lit-html/directives/unsafe-html.js'; import { formatDateTime, lineAdditionalName } from './formatters.js'; import { showModal } from './overlays.js'; -import { html } from 'lit-html'; import { settings } from './settings.js'; import { t, ds100Names } from './app_functions.js'; @@ -9,7 +10,7 @@ export const remarksModalTemplate = (remarks) => html` ${remarks.map(remark => html` <div class="row"> <span class="icon-${remark.type}"></span> - <span>${remark.text}</span> + <span>${unsafeHTML(remark.text)}</span> </div> `)} </div>