Remove signatures from text to be translated

This commit is contained in:
M66B 2022-09-20 10:03:46 +02:00
parent cf48cd3be9
commit ea84f158aa
1 changed files with 5 additions and 0 deletions

View File

@ -350,6 +350,11 @@ public class FragmentDialogTranslate extends FragmentDialogBase {
String html = Helper.readText(file);
Document d = HtmlHelper.sanitizeCompose(context, html, false);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean remove_signatures = prefs.getBoolean("remove_signatures", false);
if (remove_signatures)
HtmlHelper.removeSignatures(d);
d.select("blockquote").remove();
HtmlHelper.truncate(d, HtmlHelper.MAX_TRANSLATABLE_TEXT_SIZE);