-
Notifications
You must be signed in to change notification settings - Fork 362
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
html entities converted erroneously #92
Comments
I'm having this same problem with HTML code like: Premailer converts it into a funky character, which in an email client shows up as a question mark in a diamond. Premailer didn't use to do this ... just started about a month ago for me. |
In my post above, I pasted the HTML for non breaking space and copyright, but it's not showing the code ... it just shows the character. But basically premailer is having a problem with HTML code that begins with "&" such as the code for non breaking space and the code for copyright symbol. |
It's decoding HTML entities. And I agree, it shouldn't. |
My hacky solution for this is to remove the charset from the meta header tag. I had UTF-8 prior and it would screw it all up. Here's how I'm rolling for now: |
That IS a hacky egid workaround. Better than inlining your own styles I guess. Ok so it seems the error pre mailer is experiencing is related to the way it is treating the document because of how it's enterpeting (or misenterpreting) the doctype. Anyone have suggestions for a fix? |
As a side note, my hack also solves the problem of the |
I think the reason for this is premailer forcing the encoding to ASCII-8BIT. I'm not sure why it's doing that. |
This sort of works, but changes the encoding. For example, |
Same problem here. Straight UTF-8 characters produce errors, and HTML entities too. |
I'm having this problem too. £ gets encoded as =EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD=EF=BF=BD 💩 |
for now I switched to the Mailchimp CSS Inliner tool: http://beaker.mailchimp.com/inline-css |
I've been using the Mailchimp tool as well. Premailer has, unfortunately, been unusable for almost half of a year now. It's a shame it can't be reverted back to a previous, working version. |
Using Rails 3 and Premailer through https://github.com/fphilipe/premailer-rails3, I encountered this problem & was able to solve by explicitly setting the encoding to UTF-8.
|
@sethbro Isn't that the default? |
For premailer-rails3, yes. I failed to control for something & this isn't the fix I thought. For Premailer itself, ASCII-8BIT is the default input encoding (https://github.com/alexdunae/premailer/blob/master/lib/premailer/premailer.rb#L211), so that's probably worth setting in your own app. |
Aha! Thanks @sethbro. |
…l as hex. This should help people stuck with premailer#81 and premailer#92
Duplicates #30. |
Symbols like the registration mark are being converted and showing up as boxes with question marks in them, rendering premailer generated markup unusable. Please correct so premailer functions as it previously did, where html entities where left as is.
The text was updated successfully, but these errors were encountered: