MOBILE-3213 core: Handle anchors when cleaning extensions
This commit is contained in:
		
							parent
							
								
									c485afee02
								
							
						
					
					
						commit
						82c0385fe5
					
				@ -68,7 +68,13 @@ export class CoreMimetypeUtilsProvider {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // If the extension has parameters, remove them.
 | 
					        // If the extension has parameters, remove them.
 | 
				
			||||||
        const position = extension.indexOf('?');
 | 
					        let position = extension.indexOf('?');
 | 
				
			||||||
 | 
					        if (position > -1) {
 | 
				
			||||||
 | 
					            extension = extension.substr(0, position);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // If the extension has an anchor, remove it.
 | 
				
			||||||
 | 
					        position = extension.indexOf('#');
 | 
				
			||||||
        if (position > -1) {
 | 
					        if (position > -1) {
 | 
				
			||||||
            extension = extension.substr(0, position);
 | 
					            extension = extension.substr(0, position);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user