Update quoted-html-transformer.ts (#2457)

Added quote finder for Yahoo and AOL emails
This commit is contained in:
Nick Zayatz 2023-07-04 09:37:29 -04:00 committed by GitHub
parent bb9e373c7f
commit 1584d4cf22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -202,6 +202,7 @@ class QuotedHTMLTransformer {
_findQuoteElements(doc) {
const parsers = [
this._findGmailQuotes,
this._findYahooQuotes,
this._findBlockquoteQuotes,
this._findQuotesAfterMessageHeaderBlock,
this._findQuotesAfter__OriginalMessage__,
@ -276,6 +277,12 @@ class QuotedHTMLTransformer {
// considered quoted text.
return Array.from(doc.querySelectorAll('.gmail_quote'));
}
_findYahooQuotes(doc) {
// Both Yahoo and AOL wrap their quotes in divs with classes that contain
// the text yahoo_quoted
return Array.from(doc.querySelectorAll('[class*="yahoo_quoted"]'));
}
_findBlockquoteQuotes(doc) {
return Array.from(doc.querySelectorAll('blockquote'));