mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 21:11:30 +08:00 
			
		
		
		
	note path validation
This commit is contained in:
		
							parent
							
								
									30e75056bd
								
							
						
					
					
						commit
						6ae7661603
					
				| @ -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' | ||||
|     }; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam