From a3518d5c66e754caafbe5dc5352cb912a738834f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Mon, 4 Oct 2021 20:34:09 +0200 Subject: [PATCH 1/2] =?UTF-8?q?Hotfix=20editace=20korektur=20(mo=C5=BEn?= =?UTF-8?q?=C3=A1=20n=C4=9Bco=20rozbil)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Možná rozbil bezpečnost, ale orgové se doufám hackovat nebudou. Možná rozbil html v korekturách, ale ty snad orgové také nepoužívají. --- korektury/static/korektury/opraf.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/korektury/static/korektury/opraf.js b/korektury/static/korektury/opraf.js index 760f3c6a..61ad6862 100644 --- a/korektury/static/korektury/opraf.js +++ b/korektury/static/korektury/opraf.js @@ -152,7 +152,7 @@ function box_edit(oid, action) var text; if (action == 'update') { var text_el = document.getElementById(oid + '-text'); - text = text_el.innerHTML.unescapeHTML(); + text = text_el.textContent; // FIXME původně tu bylo innerHTML.unescapeHTML() } else { text = ''; From 2efcb4d7d63a58e3b8de76518a71756edcd1ea86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Mon, 4 Oct 2021 20:50:44 +0200 Subject: [PATCH 2/2] =?UTF-8?q?Hotfix=20editace=20koment=C3=A1=C5=99=C5=AF?= =?UTF-8?q?=20(mo=C5=BEn=C3=A1=20n=C4=9Bco=20rozbil)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Možná rozbil bezpečnost, ale orgové se doufám hackovat nebudou. Možná rozbil html v korekturách, ale ty snad orgové také nepoužívají. --- korektury/static/korektury/opraf.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/korektury/static/korektury/opraf.js b/korektury/static/korektury/opraf.js index 61ad6862..61eb5ce9 100644 --- a/korektury/static/korektury/opraf.js +++ b/korektury/static/korektury/opraf.js @@ -174,7 +174,7 @@ function update_comment(oid,ktid) var dy = parseInt(divpointer.style.top); var divbox = document.getElementById(oid); - var text = document.getElementById(ktid).innerHTML.unescapeHTML(); + var text = document.getElementById(ktid).textContent; // FIXME původně tu bylo innerHTML.unescapeHTML() return show_form(divbox.img_id, dx, dy, ktid.substring(2), text, 'update-comment'); }