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