From 1584d4cf22910b3155803d3b81ca73bc7a8495b7 Mon Sep 17 00:00:00 2001 From: Nick Zayatz Date: Tue, 4 Jul 2023 09:37:29 -0400 Subject: [PATCH] Update quoted-html-transformer.ts (#2457) Added quote finder for Yahoo and AOL emails --- app/src/services/quoted-html-transformer.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/services/quoted-html-transformer.ts b/app/src/services/quoted-html-transformer.ts index cb174edcf..543f432fb 100644 --- a/app/src/services/quoted-html-transformer.ts +++ b/app/src/services/quoted-html-transformer.ts @@ -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'));