diff --git a/VERSION b/VERSION index f0bb29e..3a3cd8c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.3.0 +1.3.1 diff --git a/src/server/handlers_web.go b/src/server/handlers_web.go index c1a38ac..a3c018d 100644 --- a/src/server/handlers_web.go +++ b/src/server/handlers_web.go @@ -147,10 +147,12 @@ func (h *CreateNoteWithFormHandler) ServeHTTP(w http.ResponseWriter, r *http.Req if !h.PageData.AllowNoEncryption && noEncryption != "" { h.WebError(w, logger, ErrEncryptionRequired, nil) + return } if !h.PageData.AllowClientEncryptionKey && encryptionKey != "" { h.WebError(w, logger, ErrClientEncryptionKeyNotAllowed, nil) + return } if !h.PageData.AllowClientEncryptionKey && encryptionKey == "" && noEncryption == "" { diff --git a/src/server/templates/note.html b/src/server/templates/note.html index 498aea2..03aca94 100644 --- a/src/server/templates/note.html +++ b/src/server/templates/note.html @@ -48,7 +48,7 @@ if (encryptionKey != "") { copierCommand += "#" + encryptionKey; } - document.getElementById("copierCommand").innerHTML = copierCommand; + document.getElementById("copierCommand").innerText = copierCommand; document.getElementById("copier").addEventListener("click", () => { document.getElementById("copierContainer").style.display = ""; }); @@ -77,7 +77,7 @@ curlCommand += " -XPOST -d '" + payload + "'"; } curlCommand += " " + window.location.origin + "/api/note/{{ .Note.ID }}"; - document.getElementById("curlCommand").innerHTML = curlCommand; + document.getElementById("curlCommand").innerText = curlCommand; document.getElementById("curl").addEventListener("click", () => { document.getElementById("curlContainer").style.display = ""; });