From 9997f5c17a7b2bcbaf20133740dfc223c2c81bda Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Thu, 28 Nov 2024 21:59:19 +0200 Subject: [PATCH] fix(client): code not building due to attempt to access server code --- .../options/other/html_import_tags.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/public/app/widgets/type_widgets/options/other/html_import_tags.js b/src/public/app/widgets/type_widgets/options/other/html_import_tags.js index 818abf499..3bf74df76 100644 --- a/src/public/app/widgets/type_widgets/options/other/html_import_tags.js +++ b/src/public/app/widgets/type_widgets/options/other/html_import_tags.js @@ -1,6 +1,20 @@ import OptionsWidget from "../options_widget.js"; import { t } from "../../../../services/i18n.js"; -import { DEFAULT_ALLOWED_TAGS } from "../../../../services/html_sanitizer.js"; + +// TODO: Deduplicate with src/services/html_sanitizer once there is a commons project between client and server. +export const DEFAULT_ALLOWED_TAGS = [ + 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'p', 'a', 'ul', 'ol', + 'li', 'b', 'i', 'strong', 'em', 'strike', 's', 'del', 'abbr', 'code', 'hr', 'br', 'div', + 'table', 'thead', 'caption', 'tbody', 'tfoot', 'tr', 'th', 'td', 'pre', 'section', 'img', + 'figure', 'figcaption', 'span', 'label', 'input', 'details', 'summary', 'address', 'aside', 'footer', + 'header', 'hgroup', 'main', 'nav', 'dl', 'dt', 'menu', 'bdi', 'bdo', 'dfn', 'kbd', 'mark', 'q', 'time', + 'var', 'wbr', 'area', 'map', 'track', 'video', 'audio', 'picture', 'del', 'ins', + 'en-media', // for ENEX import + // Additional tags (https://github.com/TriliumNext/Notes/issues/567) + 'acronym', 'article', 'big', 'button', 'cite', 'col', 'colgroup', 'data', 'dd', + 'fieldset', 'form', 'legend', 'meter', 'noscript', 'option', 'progress', 'rp', + 'samp', 'small', 'sub', 'sup', 'template', 'textarea', 'tt' +]; const TPL = `