summaryrefslogtreecommitdiff
path: root/ext/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js')
-rw-r--r--ext/js/templates/sandbox/anki-template-renderer.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/js/templates/sandbox/anki-template-renderer.js b/ext/js/templates/sandbox/anki-template-renderer.js
index 8fe248ac..022716c3 100644
--- a/ext/js/templates/sandbox/anki-template-renderer.js
+++ b/ext/js/templates/sandbox/anki-template-renderer.js
@@ -665,12 +665,12 @@ export class AnkiTemplateRenderer {
const [dictionary, content] = /** @type {[dictionary: string, content: import('dictionary-data').TermGlossaryContent]} */ (args);
/** @type {import('anki-templates').NoteData} */
const data = options.data.root;
- if (typeof content === 'string') { return this._stringToMultiLineHtml(content); }
+ if (typeof content === 'string') { return this._safeString(this._stringToMultiLineHtml(content)); }
if (!(typeof content === 'object' && content !== null)) { return ''; }
switch (content.type) {
case 'image': return this._formatGlossaryImage(content, dictionary, data);
case 'structured-content': return this._formatStructuredContent(content, dictionary, data);
- case 'text': return this._stringToMultiLineHtml(content.text);
+ case 'text': return this._safeString(this._stringToMultiLineHtml(content.text));
}
return '';
}