File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -125,10 +125,6 @@ export class CoreCustomURLSchemesProvider {
125125 // Some sites add a # at the end of the URL. If it's there, remove it.
126126 url = url . replace ( / \/ ? # ? \/ ? $ / , '' ) ;
127127
128- // In iOS, the protocol after the scheme doesn't have ":". Add it.
129- // E.g. "moodlemobile://https://..." is received as "moodlemobile://https//..."
130- url = url . replace ( / \/ \/ ( h t t p s ? ) \/ \/ / , '//$1://' ) ;
131-
132128 modal = this . domUtils . showModalLoading ( ) ;
133129
134130 // Get the data from the URL.
@@ -137,8 +133,14 @@ export class CoreCustomURLSchemesProvider {
137133
138134 return this . getCustomURLTokenData ( url ) ;
139135 } else if ( this . isCustomURLLink ( url ) ) {
136+ // In iOS, the protocol after the scheme doesn't have ":". Add it.
137+ url = url . replace ( / \/ \/ l i n k = ( h t t p s ? ) \/ \/ / , '//link=$1://' ) ;
138+
140139 return this . getCustomURLLinkData ( url ) ;
141140 } else {
141+ // In iOS, the protocol after the scheme doesn't have ":". Add it.
142+ url = url . replace ( / \/ \/ ( h t t p s ? ) \/ \/ / , '//$1://' ) ;
143+
142144 return this . getCustomURLData ( url ) ;
143145 }
144146 } ) . then ( ( result ) => {
You can’t perform that action at this time.
0 commit comments