aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/utility/URLChecker.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/utility/URLChecker.java')
-rw-r--r--src/main/java/utility/URLChecker.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/utility/URLChecker.java b/src/main/java/utility/URLChecker.java
index 99eb651..e6a54c7 100644
--- a/src/main/java/utility/URLChecker.java
+++ b/src/main/java/utility/URLChecker.java
@@ -5,6 +5,9 @@ public class URLChecker {
return term.matches("^(http|https)://.*");
}
public String getURLType(String url) {
+ if(!url.matches("^(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]*[-A-Za-z0-9+&@#/%=~_|]\n")){
+ return "search-term";
+ }
if(url.matches("^((?:https?:)?\\/\\/)?((?:www|m)\\.)?youtube\\.com\\/playlist\\?list=([\\w\\-]+)$")){
System.out.println("yt-playlist");
return "yt-playlist";
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage