From: Adam Dullage Date: Thu, 25 Aug 2022 06:54:40 +0000 (+0100) Subject: URL encoding improvements X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=f6bf4514f9cd12e663540668e33e3a2a1f75550f;p=flatnotes.git URL encoding improvements --- diff --git a/flatnotes/src/classes.js b/flatnotes/src/classes.js index 4349e29..14ce77c 100644 --- a/flatnotes/src/classes.js +++ b/flatnotes/src/classes.js @@ -8,7 +8,7 @@ class Note { } get href() { - return `${constants.basePaths.note}/${this.title}`; + return `${constants.basePaths.note}/${encodeURIComponent(this.title)}`; } get lastModifiedAsDate() { diff --git a/flatnotes/src/components/App.js b/flatnotes/src/components/App.js index f9f8314..38e0831 100644 --- a/flatnotes/src/components/App.js +++ b/flatnotes/src/components/App.js @@ -74,7 +74,7 @@ export default { // Note else if (basePath == constants.basePaths.note) { this.updateDocumentTitle(); - this.noteTitle = path[2]; + this.noteTitle = decodeURIComponent(path[2]); this.currentView = this.views.note; } diff --git a/flatnotes/src/components/Login.vue b/flatnotes/src/components/Login.vue index 5d89c79..b7f4f1f 100644 --- a/flatnotes/src/components/Login.vue +++ b/flatnotes/src/components/Login.vue @@ -1,12 +1,5 @@