From 7ad419dc8c12180e842a82118f4866ac3d074bc5 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sat, 20 Nov 2021 13:40:23 +0100 Subject: [PATCH] Fix upload of cover and book formats containing html characters --- cps/static/js/edit_books.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cps/static/js/edit_books.js b/cps/static/js/edit_books.js index ddc7a3e7e..0bfe078cf 100644 --- a/cps/static/js/edit_books.js +++ b/cps/static/js/edit_books.js @@ -248,7 +248,7 @@ $("#btn-upload-format").on("change", function () { if (filename.substring(3, 11) === "fakepath") { filename = filename.substring(12); } // Remove c:\fake at beginning from localhost chrome - $("#upload-format").html(filename); + $("#upload-format").text(filename); }); $("#btn-upload-cover").on("change", function () { @@ -256,7 +256,7 @@ $("#btn-upload-cover").on("change", function () { if (filename.substring(3, 11) === "fakepath") { filename = filename.substring(12); } // Remove c:\fake at beginning from localhost chrome - $("#upload-cover").html(filename); + $("#upload-cover").text(filename); }); $("#xchange").click(function () {