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

Underscores being interpreted as spaces (%20) in HTML body links. #41

Closed
rosstimson opened this issue Mar 5, 2015 · 9 comments
Closed
Labels

Comments

@rosstimson
Copy link

We are using Mailhog fairly extensively at work on test instances and members of development teams have been mentioning an issue with regards to underscores in links in the HTML body being wrongly interpreted as spaces.

For example if the email body has a link email_activation it gets interpreted as email%20activation. This apparently happens for all links that use underscores as we also see this glitch with image names that contain underscores that then just 404.

I hope this makes sense and if we need to investigate further I will involve some of my developer colleagues to shine some more light on this.

@ian-kent
Copy link
Member

ian-kent commented Mar 5, 2015

Thanks @rosstimson, i'll investigate asap!

@ian-kent ian-kent added the bug label Mar 5, 2015
@rcrowe
Copy link

rcrowe commented Mar 13, 2015

I can also replicate this issue if it's of any help.

@stevebelicha
Copy link

Yes I can replicate it too

@ian-kent
Copy link
Member

thanks all, and sorry, haven't had a chance to look at this yet - hopefully will soon! (but PR's welcome if anyone does has a fix)

@jygastaud
Copy link

Bug confirmed here too.

@ian-kent any news regarding that issue? Can you drive us where to look at to try to fix it?

@ian-kent
Copy link
Member

Sorry its taken a while to get around to looking at this - could anyone provide some example content please?

Just tried to reproduce it, but with a basic HTML e-mail it works as expected:

Subject: HTML test message
From: Foo <foo@bar.com>
To: Bar <bar@foo.com>
Mime-Version: 1.0
Content-Type: text/html; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit

<html>
<body>
<a href="http://iankent.uk/some_test_link">important link</a>
</body>
</html>

Wondering if it might be something to do with content encoding

@slonoed
Copy link

slonoed commented May 4, 2015

@ian-kent seems like problem in HTML renderer.

I use send to mailhog your html, and in Plan Text tab all OK

<html>
<body>
<a href=3D"http://iankent.uk/some_test_link">important link</a>
</body>
</html>

But in HTML tab

<html><head></head><body>
<a href="http://iankent.uk/some test link">important link</a>

</body></html>

@ian-kent
Copy link
Member

Thanks @slonoed - can you provide the full SMTP message you used, I can't reproduce the bug with just the headers in the example I gave

@ian-kent
Copy link
Member

I think this is fixed now - RFC2047 encoding was replacing a "_" with a " " before decoding, which is correct when applied to headers, but not the message body.

Please reopen if it hasn't been fixed 😄

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

No branches or pull requests

6 participants