|
|
@ -38,6 +38,7 @@ public class UrlUtils { |
|
|
|
'(' + // begin group for schema
|
|
|
|
'(' + // begin group for schema
|
|
|
|
"(?:http|https|file)://" + |
|
|
|
"(?:http|https|file)://" + |
|
|
|
"|(?:inline|data|about|javascript):" + |
|
|
|
"|(?:inline|data|about|javascript):" + |
|
|
|
|
|
|
|
"|(?:.+\\.i2p)" + |
|
|
|
"|(?:.*:.*@)" + |
|
|
|
"|(?:.*:.*@)" + |
|
|
|
')' + |
|
|
|
')' + |
|
|
|
"(.*)"); |
|
|
|
"(.*)"); |
|
|
@ -66,7 +67,9 @@ public class UrlUtils { |
|
|
|
// force scheme to lowercase
|
|
|
|
// force scheme to lowercase
|
|
|
|
String scheme = matcher.group(1); |
|
|
|
String scheme = matcher.group(1); |
|
|
|
String lcScheme = scheme.toLowerCase(); |
|
|
|
String lcScheme = scheme.toLowerCase(); |
|
|
|
if (!lcScheme.equals(scheme)) { |
|
|
|
if (lcScheme.contains(".i2p")) { |
|
|
|
|
|
|
|
inUrl = "http://" + lcScheme + matcher.group(2); |
|
|
|
|
|
|
|
} else if (!lcScheme.equals(scheme)) { |
|
|
|
inUrl = lcScheme + matcher.group(2); |
|
|
|
inUrl = lcScheme + matcher.group(2); |
|
|
|
} |
|
|
|
} |
|
|
|
if (hasSpace && Patterns.WEB_URL.matcher(inUrl).matches()) { |
|
|
|
if (hasSpace && Patterns.WEB_URL.matcher(inUrl).matches()) { |
|
|
|