Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
I use html-minifier for emails, and some mail servers automatically add a new line after 1000 caracters. This behaviour breaks html structure.
For example :
It's a bit kludgy though I have some ideas about how to improve it, but it should basically accomplish what you're after.
Sure. I was thinking of poking at this some more to get better-compressed results.
For example, right now it maximally-compresses
<a class="hey">link link</a>
<a class="hey"> link link </a>
I think the best we can hope for is this:
<a class = "hey" > link link </a >
But that's a fish to fry another day!
For posterity, let me clarify a bit the issue regarding "some servers". The SMTP spec RFC 821, defined back in 1982 (source) says:
As far as raw email source vs. line length is concerned, there are other factors in play, such as encoding (which can vary), for example quoted-printable is often used and it will encode limiting line length to 76 and so on. But as far as this 1000 character limiter is concerned, I'm pretty sure it's coming from this RFC 821 spec interpretation.