Strip spaces from link titles for URL check

pull/204/head
M66B 3 years ago
parent 2d7233eced
commit 81d9d46174

@ -172,7 +172,8 @@ public class FragmentDialogOpenLink extends FragmentDialogBase {
// Process title
final Uri uriTitle;
if (title != null && PatternsCompat.WEB_URL.matcher(title).matches()) {
Uri u = Uri.parse(title.contains("://") ? title : "http://" + title);
String t = title.replaceAll("\\s+", "");
Uri u = Uri.parse(title.contains("://") ? t : "http://" + t);
String host = u.getHost(); // Capture1.PNG
uriTitle = (UriHelper.hasParentDomain(context, host) ? u : null);
} else

Loading…
Cancel
Save