From 9af54a942c1ff6f6395693a3510a69518a922f17 Mon Sep 17 00:00:00 2001 From: rstular Date: Thu, 14 May 2020 11:26:31 +0200 Subject: Bug fix (Javascript is wierd) --- js/messaging.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/messaging.js b/js/messaging.js index 44c279e..60072f0 100644 --- a/js/messaging.js +++ b/js/messaging.js @@ -181,7 +181,7 @@ async function loadMsg(id) { "u": username, "p": password, "m": "fetchsporocilo", - "a": id.replace("_", "|") + "a": id.replace(/_/g, "|") }, dataType: "json", cache: false, @@ -224,7 +224,7 @@ async function deleteMsg(id) { "u": username, "p": password, "m": "izbrisisporocilo", - "a": id.replace("_", "|") + "a": id.replace(/_/g, "|") }, dataType: "json", cache: false, @@ -281,9 +281,9 @@ function displayMessage(id, data) { ${datatodecrypt} ` - $(`#msg_body-${id.replace("|", "_")}`).html(msgcontent); + $(`#msg_body-${id.replace(/\|/g, "_")}`).html(msgcontent); } else { - $(`#msg_body-${id.replace("|", "_")}`).html(filterXSS(data["telo"])); + $(`#msg_body-${id.replace(/\|/g, "_")}`).html(filterXSS(data["telo"])); } } @@ -300,7 +300,7 @@ function displayData() { ${filterXSS(element["id"])} -

+