forked from mirror/monocles_chat
add https/http check to custom invidious host
This commit is contained in:
parent
40b783a470
commit
ee24656463
1 changed files with 4 additions and 1 deletions
|
@ -148,7 +148,10 @@ public class MyLinkify {
|
|||
}
|
||||
|
||||
private static boolean isValid(String url) {
|
||||
String urlstring = "https://" + url;
|
||||
String urlstring = url;
|
||||
if (!urlstring.toLowerCase(Locale.US).startsWith("http://") && !urlstring.toLowerCase(Locale.US).startsWith("https://")) {
|
||||
urlstring = "https://" + url;
|
||||
}
|
||||
try {
|
||||
return URLUtil.isValidUrl(urlstring) && Patterns.WEB_URL.matcher(urlstring).matches();
|
||||
} catch (Exception e) {
|
||||
|
|
Loading…
Add table
Reference in a new issue