TF-4265 Exclude our signature by add removeTMailSignature option to extractPlainText method
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user