From 41ea9c2d570c93ae9c290ecda20732399ffdc36b Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 12 Feb 2026 18:11:24 -0400 Subject: client: sidebar-search: handle HTML entities --- src/static/js/client-util.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/static/js/client-util.js') diff --git a/src/static/js/client-util.js b/src/static/js/client-util.js index 74d63ad6..0c113758 100644 --- a/src/static/js/client-util.js +++ b/src/static/js/client-util.js @@ -65,6 +65,14 @@ export function templateContent(el, slots = {}) { return content; } +export function decodeEntities(string) { + if (!string) return string; + + const textarea = document.createElement('textarea'); + textarea.innerHTML = string; + return textarea.value; +} + // Curry-style, so multiple points can more conveniently be tested at once. export function pointIsOverAnyOf(elements) { return (clientX, clientY) => { -- cgit 1.3.0-6-gf8a5