premailer icon indicating copy to clipboard operation
premailer copied to clipboard

Text version loses links

Open glebm opened this issue 12 years ago • 4 comments

test.html:

<table><tbody><tr><td><a href="http://google.com/">Activate account
</a></td></tr></tbody></table>

The I run:

> premailer test.html --mode txt
Activate account

Tested with nokogiri.

Strangely, if I remove the linebreak after the first line then it works fine.

glebm avatar May 22 '12 14:05 glebm

is this not what you would expect? its outputted as text not html and links are html?

nodrog avatar Jul 31 '12 08:07 nodrog

Here is the expected output:

Activate account ( http://google.com/ )

glebm avatar Jul 31 '12 12:07 glebm

Using Rails 3 and Premailer through https://github.com/fphilipe/premailer-rails3, I've found that simple a elements (generated through Haml in my case) do not have urls output in text emails, but links generated with Rails' link_to do. I haven't investigated but would guess it has something to do with parse order.

sethbro avatar Aug 01 '12 20:08 sethbro

It's the line break that breaks it

glebm avatar Aug 06 '12 18:08 glebm