mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-05 08:33:37 +02:00
Fixed clearing annotations
This commit is contained in:
@@ -328,20 +328,7 @@ public class HtmlHelper {
|
||||
|
||||
static Document sanitizeCompose(Context context, String html, boolean show_images) {
|
||||
try {
|
||||
Document d = sanitize(context, JsoupEx.parse(html), false, show_images);
|
||||
d.select("*")
|
||||
.removeAttr("x-block")
|
||||
.removeAttr("x-inline")
|
||||
.removeAttr("x-paragraph")
|
||||
.removeAttr("x-font-size")
|
||||
.removeAttr("x-font-size-rel")
|
||||
.removeAttr("x-line-before")
|
||||
.removeAttr("x-line-after")
|
||||
.removeAttr("x-align")
|
||||
.removeAttr("x-column")
|
||||
.removeAttr("x-dashed")
|
||||
.removeAttr("x-tracking");
|
||||
return d;
|
||||
return sanitize(context, JsoupEx.parse(html), false, show_images);
|
||||
} catch (Throwable ex) {
|
||||
// OutOfMemoryError
|
||||
Log.e(ex);
|
||||
@@ -2520,6 +2507,21 @@ public class HtmlHelper {
|
||||
return ssb;
|
||||
}
|
||||
|
||||
static void clearAnnotations(Document d) {
|
||||
d.select("*")
|
||||
.removeAttr("x-block")
|
||||
.removeAttr("x-inline")
|
||||
.removeAttr("x-paragraph")
|
||||
.removeAttr("x-font-size")
|
||||
.removeAttr("x-font-size-rel")
|
||||
.removeAttr("x-line-before")
|
||||
.removeAttr("x-line-after")
|
||||
.removeAttr("x-align")
|
||||
.removeAttr("x-column")
|
||||
.removeAttr("x-dashed")
|
||||
.removeAttr("x-tracking");
|
||||
}
|
||||
|
||||
static Spanned fromHtml(@NonNull String html, Context context) {
|
||||
return fromHtml(html, null, null, context);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user