lever / planer Goto Github PK
View Code? Open in Web Editor NEWRemove reply quotations from emails
License: MIT License
Remove reply quotations from emails
License: MIT License
Hello ๐
I run a security community that finds and fixes vulnerabilities in OSS. A researcher (@Ilaygoldman) has found a potential issue, which I would be eager to share with you.
Could you add a SECURITY.md
file with an e-mail address for me to send further details to? GitHub recommends a security policy to ensure issues are responsibly disclosed, and it would help direct researchers in the future.
Looking forward to hearing from you ๐
(cc @huntr-helper)
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 <<br/><a href="mailto:[email protected]">[email protected]</a>> wrote:</p><p>> Original message<br/>></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 <<br> <a href="mailto:[email protected]"> [email protected] </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!
I am trying planer with webmail but it converts multiline reply to single line
It removes breakline
Just wondering if this is still maintained.
If not, do you have an alternative open source solution?
When using Zoho Mail (web client) Planer does not omit part of quoted text, which usualy says "wrote ----".
Here's the result HTML. It seems that the content is easy to catch with zmail_extra
CSS class.
<html><body><div style="font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;color:#00000;"> <div> Replying to a message :)<br> </div> <div> <br>This may be fun </div> <div> <br> </div> <div class="zmail_extra"> <div id="Zm-_Id_-Sgn1"> <div> <br> </div> <div> wrote ----<br> </div> </div> <div> <br> </div> </div> </div> <br></body></html>
test case
const Planer = require('planer');
const JSdom = require('jsdom');
const document = new JSdom.JSDOM().window.document;
Planer.extractFrom('<html><head><link rel="stylesheet" href="https://example.com/app.min.css"></head><body>hello world</body></html>', 'text/html', document);
live test case: https://runkit.com/adrivanhoudt/planer-jsdom-fetch-error
I think it has something to do with jsdom's new resource loader in v12.
Not sure why it is trying to load the resource though since it states it doesn't do that by default but maybe planer's use of innerHTML = body breaks it?
Hi,
Im trying to use the library to extract html from outlook client, and it seems not be working.
It does wrap the content with and tags, but not really extract the reply.
Do you support client outlook?
Thank you in very much!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.