1
0
mirror of https://framagit.org/tom79/nitterizeme synced 2025-02-17 20:20:59 +01:00

Fix issue #47 - Add nzzl.us and ift.tt unshorten support

This commit is contained in:
Thomas 2020-11-11 15:51:11 +01:00
parent 68bb3dc73b
commit be79a7a489
4 changed files with 11 additions and 1 deletions

View File

@ -49,6 +49,8 @@
<data android:host="amp.gs" />
<data android:host="tinyurl.com" />
<data android:host="goo.gl" />
<data android:host="nzzl.us" />
<data android:host="ift.tt" />
<data android:host="ow.ly" />
<data android:host="bl.ink" />
<data android:host="buff.ly" />
@ -119,6 +121,8 @@
<data android:host="amp.gs" />
<data android:host="tinyurl.com" />
<data android:host="goo.gl" />
<data android:host="nzzl.us" />
<data android:host="ift.tt" />
<data android:host="ow.ly" />
<data android:host="bl.ink" />
<data android:host="buff.ly" />

View File

@ -47,6 +47,8 @@
<data android:host="amp.gs" />
<data android:host="tinyurl.com" />
<data android:host="goo.gl" />
<data android:host="nzzl.us" />
<data android:host="ift.tt" />
<data android:host="ow.ly" />
<data android:host="bl.ink" />
<data android:host="buff.ly" />
@ -90,6 +92,8 @@
<data android:host="amp.gs" />
<data android:host="tinyurl.com" />
<data android:host="goo.gl" />
<data android:host="nzzl.us" />
<data android:host="ift.tt" />
<data android:host="ow.ly" />
<data android:host="bl.ink" />
<data android:host="buff.ly" />

View File

@ -67,6 +67,8 @@ public class CheckAppActivity extends AppCompatActivity {
"amp.gs",
"tinyurl.com",
"goo.gl",
"nzzl.us",
"ift.tt",
"ow.ly",
"bl.ink",
"buff.ly",

View File

@ -139,7 +139,7 @@ public class Utils {
};
private static String urlRegex = "(?i)\\b((?:[a-z][\\w-]+:(?:/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,10}/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\".,<>?«»“”‘’]))";
private static final String urlRegex = "(?i)\\b((?:[a-z][\\w-]+:(?:/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,10}/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\".,<>?«»“”‘’]))";
public static final Pattern urlPattern = Pattern.compile(
urlRegex,
Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);