diff options
author | praschke <stel@comfy.monster> | 2023-10-17 21:52:31 +0100 |
---|---|---|
committer | praschke <stel@comfy.monster> | 2023-10-17 21:52:31 +0100 |
commit | 376a1b096874e601296321fa6307836e2736a05c (patch) | |
tree | 5ef7fa6f35f90de6aec2ed5e8091ab28fdba30f8 /ext/js/templates/sandbox/anki-template-renderer.js | |
parent | ae91e2442d7b3746c633871ff956a8addd7046b5 (diff) |
fix: formatGlossary
Diffstat (limited to 'ext/js/templates/sandbox/anki-template-renderer.js')
-rw-r--r-- | ext/js/templates/sandbox/anki-template-renderer.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/js/templates/sandbox/anki-template-renderer.js b/ext/js/templates/sandbox/anki-template-renderer.js index e15bf895..62bf71b8 100644 --- a/ext/js/templates/sandbox/anki-template-renderer.js +++ b/ext/js/templates/sandbox/anki-template-renderer.js @@ -497,7 +497,7 @@ class AnkiTemplateRenderer { this._normalizeHtml(container, styleApplier, datasetKeyIgnorePattern); const result = container.innerHTML; container.textContent = ''; - return result; + return this._safeString(result); } _normalizeHtml(root, styleApplier, datasetKeyIgnorePattern) { @@ -550,9 +550,8 @@ class AnkiTemplateRenderer { return instance; } - _formatGlossary(context, dictionary, options) { + _formatGlossary(context, dictionary, content, options) { const data = options.data.root; - const content = options.fn(context); if (typeof content === 'string') { return this._stringToMultiLineHtml(this._escape(content)); } if (!(typeof content === 'object' && content !== null)) { return ''; } switch (content.type) { |