Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not all reply markup removed from emails generated by Gmail #5

Open
alignus-matt opened this issue Dec 8, 2017 · 1 comment
Open

Comments

@alignus-matt
Copy link

alignus-matt commented Dec 8, 2017

Hey! Cool package! I was assessing solutions for the very nasty problem of removing reply text from emails, and after researching many of the same paths others have (regexes++, a "reply above this line" indicator, etc) I stumbled across your article on Medium. Just wanted to say I love your minimalist spirit and thank you for your open source contributions.

I tested your package briefly, and thought I'd let you know that it fails to completely remove reply markup from emails sent by Gmail's web client.

HTML as sent by Gmail:

<p>This is a reply</p><p>On Thu, Dec 7, 2017 at 4:42 PM, f f &lt;<br/><a href="mailto:recip@inbound.mydomain.us">recip@inbound.mydomain.us</a>&gt; wrote:</p><p>&gt; Original message<br/>&gt;</p>

HTML returned by planer.extractFromHtml():

<html><body><p> This is a reply </p> <p> On Thu, Dec 7, 2017 at 4:42 PM, f f &lt;<br> <a href="mailto:recip@inbound.mydomain.us"> recip@inbound.mydomain.us </a></p><p><br></p></body></html>

Latest version of planer, node environment, jsdom as DOM implementation, where my call to extractFromHtml looks like:

planer.extractFromHtml(emailHtml, new JSDOM('').window.document)

Thought you might like to know. Cheers!

@l8on
Copy link
Contributor

l8on commented Oct 10, 2018

That's odd, planer generally works quite well on gmail replies. Gmail usually places the quoted text in an element with a gmail-quote class, and removing that element usually does the trick.

It still seems to work for gmail replies in the Lever product, so I'm not sure how you were able to generate an email reply within gmail that doesn't have a gmail-quote div. If you have any more information about how to reproduce your issue, please add to this issue.

Also, thanks for the shout @alignus-matt, I'm glad someone found that blog post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants