Skip to content

Commit

Permalink
fix: encode vault parameter
Browse files Browse the repository at this point in the history
close #186
  • Loading branch information
Vinzent03 committed Aug 30, 2024
1 parent a5f6d53 commit 26376d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ export default class Tools {
if (this.settings.includeVaultName) {
suffix += "?vault=";
if (this.settings.vaultParam == "id" && this.app.appId) {
suffix += this.app.appId;
suffix += encodeURIComponent(this.app.appId);
} else {
suffix += this.app.vault.getName();
suffix += encodeURIComponent(this.app.vault.getName());
}
}
if (
Expand Down Expand Up @@ -116,7 +116,7 @@ export default class Tools {
}
// When the URI gets decoded, the %20 at the end gets somehow removed.
// Adding a trailing & to prevent this.
if(suffix.endsWith("%20")) suffix += "&";
if (suffix.endsWith("%20")) suffix += "&";
return prefix + suffix;
}

Expand Down

0 comments on commit 26376d7

Please sign in to comment.