mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 15:11:03 +00:00
Strip spaces from link titles for URL check
This commit is contained in:
parent
2d7233eced
commit
81d9d46174
1 changed files with 2 additions and 1 deletions
|
@ -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…
Reference in a new issue