mirror of
				https://github.com/gristlabs/grist-core.git
				synced 2025-06-13 20:53:59 +00:00 
			
		
		
		
	Hyphens are typically used by MinIO in version ids (these are uuids).
We need to escape them as they are not included in the path to load a document
after bcb9740
			
			
This commit is contained in:
		
							parent
							
								
									d8048c3998
								
							
						
					
					
						commit
						af676642d4
					
				@ -1038,7 +1038,7 @@ export function buildUrlId(parts: UrlIdParts): string {
 | 
				
			|||||||
    // may be in a docId (leaving just the hyphen, which is permitted).  The limits
 | 
					    // may be in a docId (leaving just the hyphen, which is permitted).  The limits
 | 
				
			||||||
    // could be loosened, but without much benefit.
 | 
					    // could be loosened, but without much benefit.
 | 
				
			||||||
    const codedSnapshotId = encodeURIComponent(parts.snapshotId)
 | 
					    const codedSnapshotId = encodeURIComponent(parts.snapshotId)
 | 
				
			||||||
      .replace(/[_.!~*'()]/g, ch => `_${ch.charCodeAt(0).toString(16).toUpperCase()}`)
 | 
					      .replace(/[_.!~*'()-]/g, ch => `_${ch.charCodeAt(0).toString(16).toUpperCase()}`)
 | 
				
			||||||
      .replace(/%/g, '_');
 | 
					      .replace(/%/g, '_');
 | 
				
			||||||
    token = `${token}~v=${codedSnapshotId}`;
 | 
					    token = `${token}~v=${codedSnapshotId}`;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user