From bbe8fb953ede2456fb19bef96c73d2a2606e50a9 Mon Sep 17 00:00:00 2001
From: WBHarry <89362246+WBHarry@users.noreply.github.com>
Date: Fri, 9 Jan 2026 15:57:57 +0100
Subject: [PATCH] Fixed so that tagify tooltip descriptions cannot end up with
raw HTML that breaks it (#1504)
---
module/helpers/utils.mjs | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/module/helpers/utils.mjs b/module/helpers/utils.mjs
index 396ed2fa..a28725b1 100644
--- a/module/helpers/utils.mjs
+++ b/module/helpers/utils.mjs
@@ -119,7 +119,7 @@ export const tagifyElement = (element, baseOptions, onChange, tagifyOptions = {}
spellcheck='false'
tabIndex="${this.settings.a11y.focusableTags ? 0 : -1}"
class="${this.settings.classNames.tag} ${tagData.class ? tagData.class : ''}"
- data-tooltip="${tagData.description || tagData.name}"
+ data-tooltip="${tagData.description ? htmlToText(tagData.description) : tagData.name}"
${this.getAttributes(tagData)}>