Fixed auto linking email addresses

This commit is contained in:
M66B 2022-02-17 10:06:05 +01:00
parent 00d5253c41
commit ff31886788
1 changed files with 2 additions and 2 deletions

View File

@ -1354,9 +1354,9 @@ public class HtmlHelper {
// geo:<lat>,<lon>[,<alt>][;u=<uncertainty>]
// tel:<phonenumber>
final Pattern GPA_PATTERN = Pattern.compile("GPA\\.\\d{4}-\\d{4}-\\d{4}-\\d{5}");
final String BOUNDARY = "(?:\\b|$|^)";
final Pattern pattern = Pattern.compile(
"(((?i:mailto):)?" + PatternsCompat.AUTOLINK_EMAIL_ADDRESS.pattern() +
"(\\?[^\\s]*)" /* query parameters */ + ")" +
"(" + BOUNDARY + "((?i:mailto):)?" + Helper.EMAIL_ADDRESS + "(\\?[^\\s]*)?" + BOUNDARY + ")" +
"|" +
PatternsCompat.AUTOLINK_WEB_URL.pattern()
.replace("(?i:http|https|rtsp)://",