forked from EVOgeek/Vmeda.Online
		
	MOBILE-3039 core: Fix old custom URL links in iOS
This commit is contained in:
		
							parent
							
								
									b2c63f4503
								
							
						
					
					
						commit
						f4cd6f37b0
					
				| @ -125,10 +125,6 @@ export class CoreCustomURLSchemesProvider { | ||||
|             // Some sites add a # at the end of the URL. If it's there, remove it.
 | ||||
|             url = url.replace(/\/?#?\/?$/, ''); | ||||
| 
 | ||||
|             // In iOS, the protocol after the scheme doesn't have ":". Add it.
 | ||||
|             // E.g. "moodlemobile://https://..." is received as "moodlemobile://https//..."
 | ||||
|             url = url.replace(/\/\/(https?)\/\//, '//$1://'); | ||||
| 
 | ||||
|             modal = this.domUtils.showModalLoading(); | ||||
| 
 | ||||
|             // Get the data from the URL.
 | ||||
| @ -137,8 +133,14 @@ export class CoreCustomURLSchemesProvider { | ||||
| 
 | ||||
|                 return this.getCustomURLTokenData(url); | ||||
|             } else if (this.isCustomURLLink(url)) { | ||||
|                 // In iOS, the protocol after the scheme doesn't have ":". Add it.
 | ||||
|                 url = url.replace(/\/\/link=(https?)\/\//, '//link=$1://'); | ||||
| 
 | ||||
|                 return this.getCustomURLLinkData(url); | ||||
|             } else { | ||||
|                 // In iOS, the protocol after the scheme doesn't have ":". Add it.
 | ||||
|                 url = url.replace(/\/\/(https?)\/\//, '//$1://'); | ||||
| 
 | ||||
|                 return this.getCustomURLData(url); | ||||
|             } | ||||
|         }).then((result) => { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user