note path validation

pull/255/head
zadam 2023-08-02 23:23:31 +07:00
parent 30e75056bd
commit 6ae7661603
1 changed files with 5 additions and 0 deletions

@ -148,6 +148,11 @@ function parseNavigationStateFromUrl(url) {
const hash = url.substr(hashIdx + 1); // strip also the initial '#'
const [notePath, paramString] = hash.split("?");
if (!notePath.match(/^[_a-z0-9]{4,}(\/[_a-z0-9]{4,})*$/i)) {
return {};
}
const viewScope = {
viewMode: 'default'
};