mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-01 06:38:29 +02:00
Added detect HTML
This commit is contained in:
@@ -3829,12 +3829,6 @@ public class HtmlHelper {
|
||||
.remove("x-keep-line");
|
||||
}
|
||||
|
||||
static boolean isHtml(String text) {
|
||||
Pattern p = Pattern.compile(".*\\<[^>]+>.*", Pattern.DOTALL);
|
||||
boolean isHtml = p.matcher(text).matches();
|
||||
return isHtml;
|
||||
}
|
||||
|
||||
static Spanned fromHtml(@NonNull String html, Context context) {
|
||||
Document document = JsoupEx.parse(html);
|
||||
return fromDocument(context, document, null, null);
|
||||
|
||||
Reference in New Issue
Block a user