From 9eaeffca7e507e2142e6da27d0f8669ea70ea5f7 Mon Sep 17 00:00:00 2001 From: krateng Date: Thu, 13 Oct 2022 18:06:02 +0200 Subject: [PATCH] Sanitize artists and tracks in search results, GH-167 --- maloja/web/static/js/search.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/maloja/web/static/js/search.js b/maloja/web/static/js/search.js index f903bae..b5244dc 100644 --- a/maloja/web/static/js/search.js +++ b/maloja/web/static/js/search.js @@ -68,7 +68,7 @@ function searchresult() { var node = oneresult.cloneNode(true); node.setAttribute("onclick","goto('" + link + "')"); node.children[0].style.backgroundImage = "url('" + image + "')"; - node.children[1].children[0].innerHTML = name; + node.children[1].children[0].textContent = name; results_artists.appendChild(node); } @@ -82,8 +82,8 @@ function searchresult() { var node = oneresult.cloneNode(true); node.setAttribute("onclick","goto('" + link + "')"); node.children[0].style.backgroundImage = "url('" + image + "')"; - node.children[1].children[0].innerHTML = artists; - node.children[1].children[2].innerHTML = title; + node.children[1].children[0].textContent = artists; + node.children[1].children[2].textContent = title; results_tracks.appendChild(node); }