TF-4265 Exclude our signature by add removeTMailSignature option to extractPlainText method

This commit is contained in:
dab246
2026-01-30 11:12:53 +07:00
committed by Dat H. Pham
parent c5401561ca
commit 5e1d99125e
2 changed files with 77 additions and 0 deletions
+4
View File
@@ -916,6 +916,7 @@ class HtmlUtils {
bool removeQuotes = true,
bool removeStyle = true,
bool removeScript = true,
bool removeTMailSignature = true,
}) {
var cleaned = html;
@@ -934,6 +935,9 @@ class HtmlUtils {
if (removeScript) {
doc.querySelectorAll('script').forEach((e) => e.remove());
}
if (removeTMailSignature) {
doc.querySelectorAll('div.tmail-signature').forEach((e) => e.remove());
}
cleaned = doc.outerHtml;