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

Fix from quote headers regexes #60

Merged
merged 1 commit into from
May 31, 2017

Conversation

kipit
Copy link
Contributor

@kipit kipit commented May 26, 2017

This fix two things for "From:" quote headers.

Improve regex for edge case

We had to handle this kind of weird email (note that the begining of the content are newlines):


From: foo <foo@example.com>

My email is <foo@example.com>

We the actual regex, this lead to messup the content of the second fragment, instead of getting:

From: foo <foo@example.com>

My email is <foo@example.com>

we get

From: foo <foo@example.com> My email is <foo@example.com>

ATM, a simple solution is to consider that this kind of header cannot span over multiple lines. This is the solution we offer in this PR.

Fix escaping of '['**

Working on this fix we encounter a case that caught up to our eye that an escaping was missing.

@willdurand willdurand self-requested a review May 26, 2017 12:32
@kipit
Copy link
Contributor Author

kipit commented May 31, 2017

@willdurand any problem with these modifications?

@willdurand willdurand merged commit 747ed12 into willdurand:master May 31, 2017
@willdurand
Copy link
Owner

nope, I forgot this PR.. Thanks!

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

Successfully merging this pull request may close these issues.

2 participants