Fixed styling signature editor

This commit is contained in:
M66B 2022-11-06 15:18:55 +01:00
parent 7ff386078e
commit 62fcc7da21
1 changed files with 7 additions and 3 deletions

View File

@ -289,8 +289,10 @@ public class ActivitySignature extends ActivityBase {
etText.setText(null);
else if (etText.isRaw())
etText.setText(html);
else
etText.setText(HtmlHelper.fromHtml(html, new HtmlHelper.ImageGetterEx() {
else {
Document d = JsoupEx.parse(html);
d = HtmlHelper.sanitizeView(this, d, true);
Spanned signature = HtmlHelper.fromDocument(this, d, new HtmlHelper.ImageGetterEx() {
@Override
public Drawable getDrawable(Element element) {
String source = element.attr("src");
@ -299,7 +301,9 @@ public class ActivitySignature extends ActivityBase {
return ImageHelper.decodeImage(ActivitySignature.this,
-1, element, true, 0, 1.0f, etText);
}
}, null, this));
}, null);
etText.setText(signature);
}
loaded = true;
}