0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2025-01-03 05:00:13 -05:00

Make check for link protocol case-insensitive

Resolves #308.
This commit is contained in:
Neil Jenkins 2018-06-23 14:39:32 +10:00
parent 35a25e6d44
commit 7a24d6c505
3 changed files with 3 additions and 3 deletions

View file

@ -4268,7 +4268,7 @@ var addLinks = function ( frag, root, self ) {
} }
child = self.createElement( 'A', mergeObjects({ child = self.createElement( 'A', mergeObjects({
href: match[1] ? href: match[1] ?
/^(?:ht|f)tps?:/.test( match[1] ) ? /^(?:ht|f)tps?:/i.test( match[1] ) ?
match[1] : match[1] :
'http://' + match[1] : 'http://' + match[1] :
'mailto:' + match[0] 'mailto:' + match[0]

File diff suppressed because one or more lines are too long

View file

@ -1805,7 +1805,7 @@ var addLinks = function ( frag, root, self ) {
} }
child = self.createElement( 'A', mergeObjects({ child = self.createElement( 'A', mergeObjects({
href: match[1] ? href: match[1] ?
/^(?:ht|f)tps?:/.test( match[1] ) ? /^(?:ht|f)tps?:/i.test( match[1] ) ?
match[1] : match[1] :
'http://' + match[1] : 'http://' + match[1] :
'mailto:' + match[0] 'mailto:' + match[0]