From 935952c036fb791c4e368047f955c3b5e9f56bb8 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 13 Mar 2019 06:25:40 +0000 Subject: [PATCH] Fixed autolinking --- app/src/main/java/eu/faircode/email/HtmlHelper.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/HtmlHelper.java b/app/src/main/java/eu/faircode/email/HtmlHelper.java index 69b69f1bcc..38907ff7bd 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -244,12 +244,14 @@ public class HtmlHelper { if (node instanceof TextNode) { TextNode tnode = (TextNode) node; - String text = tnode.text(); - Matcher matcher = PatternsCompat.WEB_URL.matcher(text); + Matcher matcher = PatternsCompat.WEB_URL.matcher(tnode.text()); if (matcher.matches()) { Element span = document.createElement("span"); int pos = 0; + String text = tnode.text(); + + matcher.reset(); while (matcher.find()) { boolean linked = false; Node parent = tnode.parent();