premailer / premailer Goto Github PK
View Code? Open in Web Editor NEWPreflight for HTML email
Home Page: https://premailer.github.io/premailer
License: Other
Preflight for HTML email
Home Page: https://premailer.github.io/premailer
License: Other
Here's the error I receive:
E:\Ruby187\bin>premailer_plus "C:\inputfile.html" "C:\outputfile.html" -v
E:/Ruby187/lib/ruby/1.8/uri/common.rb:436:in `split': bad URI(is not URI?): C:\inputfile.html (URI::InvalidURIError)
from E:/Ruby187/lib/ruby/1.8/uri/common.rb:485:in `parse'
from E:/Ruby187/lib/ruby/gems/1.8/gems/premailer-plus-0.1.3/bin/../lib/premailer.rb:212:in `load_css_from_html!'
from E:/Ruby187/lib/ruby/gems/1.8/gems/premailer-plus-0.1.3/bin/../lib/premailer.rb:195:in `each'
from E:/Ruby187/lib/ruby/gems/1.8/gems/premailer-plus-0.1.3/bin/../lib/premailer.rb:195:in `load_css_from_html!'
from E:/Ruby187/lib/ruby/gems/1.8/gems/premailer-plus-0.1.3/bin/../lib/premailer.rb:86:in `initialize'
from E:/Ruby187/lib/ruby/gems/1.8/gems/premailer-plus-0.1.3/bin/premailer_plus:45:in `new'
from E:/Ruby187/lib/ruby/gems/1.8/gems/premailer-plus-0.1.3/bin/premailer_plus:45:in `run'
from E:/Ruby187/lib/ruby/gems/1.8/gems/premailer-plus-0.1.3/bin/premailer_plus:107
from E:/Ruby187/bin/premailer_plus:19:in `load'
from E:/Ruby187/bin/premailer_plus:19
The input file I'm using is the example used by premailer (from http://premailer.dialect.ca/tests/base.html).
Perhaps from the title, you can see what this is about ;)
Currently, Premailer assumes the presence of "<head>" with at least a child in it in order for write_unmergable_css_rules() to work. If not, the following exception occurs when to_inline_css().
>> premailer.to_inline_css NoMethodError: undefined method `after' for nil:NilClass from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.4/lib/active_support/whiny_nil.rb:48:in `method_missing' from /Library/Ruby/Gems/1.8/gems/premailer-1.5.7/lib/premailer/premailer.rb:353:in `write_unmergable_css_rules' from /Library/Ruby/Gems/1.8/gems/premailer-1.5.7/lib/premailer/premailer.rb:252:in `to_inline_css' from (irb):22 from :0
Can we fix/enhance it so that this great tool doesn't bail out when applying CSS to partial HTML content/snippet? As you could imagine, there are numerous occasions when such use cases arise. (Besides, clients like Gmail strips off anything inside <head> and ignores any inline <style> tags anyway.). Perhaps there can be an additional option to specify the case when the html is not a full-blown html page and therefore, the insertion of unmergable_css_style can either be omitted, or simply placed at the beginning of the rendered html string (to be left to the rendering client's discretion whether to honor or not).
Thanks!
I've written an automated BASH script to run a bunch of HTML files through premailer. If I run the files indivudually via premailer -v /path/to/emails/07-19-2011.html
everything works fine. If I run the a script from the terminal (which executes the command previously stated; I got the exact command via set -x
on the BASH script) on OS X 10.6 via bash process.bash
I get the following error:
/Library/Ruby/Gems/1.8/gems/hpricot-0.8.4/lib/hpricot/parse.rb:33: [BUG] Segmentation fault
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
process.bash: line 36: 52675 Abort trap ruby /usr/bin/premailer -v $emailFile
I've only recently been learning ruby, so I'm definitely no expert, and this problem has truly stumped me. Any help would be much appreciated!
Would love to be able to have PreMailer support some more CSS selectors, primarily:
Using the bookmarklet in Firefox 3.6 on Windows XP, Premailer works great with local files (both using a local server and opening an HTML file in the browser). Because it's local, though, it doesn't convert relative URLs to absolute.
When I use the bookmarklet on a live URL, however, it doesn't quite work. I get this; http://premailer.dialect.ca/?bookmarklet=true&url=http%3A%2F%2Fsilveroakspleasanton.com%2Fautoresponder%2Findex.html&utm_source=remote_bookmarklet&utm_medium=bookmarklet&utm_campaign=Tools
Not such a big deal, but it would be cool if it worked on live URLs so that I didn't have to manually change relative links to absolute.
Thanks for the great utility, it's very useful!
Premailer is now encoding anchor links; it shouldn't. Encoding anchor links causes issues with some link tracking systems. The encoded link is stored and replaced with a tracking link, and when the tracking link is clicked it makes a server redirect to the encoded link, which fails.
For example, the following link:
testing.com/index.php?pram1=one&pram2=two
...Is encoded to:
testing.com/index.php?pram1=one&pram2=two
Of course this is a flaw of the tracking system as well. It should encode the links before it stores them. However, not all tracking systems do this, or are willing to update their system. To make Premailer work well for as many people as possible, it should not encode anchor links.
Plus, encoding anchor links has nothing to do with making CSS inline.
Hello,
this is not a bug. Or at least, as far as I can tell. It could just as easily be my lack of experience with Ruby.
Anyhow, I'm trying to get things working via the command line. I'm using Crunchbang Statler (Debian based).
I installed everyting that is needed, I checked a gazillion (well, not really, Google doesn't really return that many results when looking for premailer documentation) websites, forums, etc, but I was not yet able to get it running.
I did:
apt-get install ruby-full ruby-dev rubygems libruby
gem install htmlentities premailer hpricot
First off, running "ruby premailer in.html out.html warnings.txt"
returns: "ruby: No such file or directory -- premailer (LoadError)"
Running: "ruby path/to/bin/premailer in.html out.html warnings.txt"
returns:
"/var/lib/gems/1.8/gems/premailer-1.7.1/lib/premailer/adapter.rb:53:in const_get': no such file to load -- premailer/adapter/hpricot (LoadError) from /var/lib/gems/1.8/gems/premailer-1.7.1/lib/premailer/adapter.rb:53:in
find'
from /var/lib/gems/1.8/gems/premailer-1.7.1/lib/premailer/adapter.rb:46:in use=' from /var/lib/gems/1.8/gems/premailer-1.7.1/lib/premailer/adapter.rb:21:in
use'
from /var/lib/gems/1.8/gems/premailer-1.7.1/lib/premailer/premailer.rb:129:in initialize' from /var/lib/gems/1.8/gems/premailer-1.7.1/bin/premailer:87:in
new'
from /var/lib/gems/1.8/gems/premailer-1.7.1/bin/premailer:87"
Running "ruby /var/lib/gems/1.8/gems/premailer-1.7.1/lib/premailer.rb in.html out.html warnings.html"
returns: nothing (and apparently did nothing)
Same thing when running these command with the "-rubygems" operator.
"gem list" returns:
*** LOCAL GEMS ***
css_parser (1.1.9)
hpricot (0.8.4)
htmlentities (4.3.0)
premailer (1.7.1)
"gem env" returns:
RubyGems Environment:
I'm kinda stumped here...
Kind regards, and thanks in advance!
Maarten
On Debian Linux, I get the following error when running premailer:
/root/premailer-read-only/new/lib/premailer/premailer.rb:256:in to_inline_css': private method
create_dimensions_shorthand!' called for #CssParser::RuleSet:0xb79705b0 (NoMethodError)
from /root/premailer-read-only/new/lib/premailer/premailer.rb:225:in each' from /root/premailer-read-only/new/lib/premailer/premailer.rb:225:in
to_inline_css'
from bin/premailer:96
Any ideas how to fix this? Thanks.
Because the head and body tags often get stripped out by mail clients.
It should write unmergeable_rules just before the closing body tag.
Using valid XHTML as input, after the premailer, minor errors are present: the <img>, <br> and <meta> are missing the closing slash.
For example:
<img src="..." width="36" height="17" alt="" />
is converted to:
<img src="..." width="36" height="17" alt="">
I use pommo as my mailer and it uses the tag [[!unsubscribe]] to mark unsubscribe links. Premailer is now striping out these tags in both the html and text version.
hi,
i read about using target="_blank" in E-Mailings to make sure a new page will be opend in some webmailer. Perhaps it would be helpful for some people if the great premailer could offer this as new feature?
Best regards
Andi
I'm pretty new/ignorant of ruby, but I would very much like to use the premailer script to do the css attribute thing from the commandline. I followed your directions in the readme (on an Ubuntu 9.10 (karmic)) host, and got the following:
$ sudo gem install premailer
Building native extensions. This could take a while...
ERROR: Error installing premailer:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1
Gem files will remain installed in /var/lib/gems/1.8/gems/hpricot-0.8.2 for inspection.
Results logged to /var/lib/gems/1.8/gems/hpricot-0.8.2/ext/fast_xs/gem_make.out
At this point, I'm lost and don't know how to proceed.
When using the "!important" declaration inline, it still gets overwritten with the external CSS property that also has the "!important" declaration.
See for instance:
example #5 on http://www.electrictoolbox.com/using-important-css/
... since they can interfere with the css of web-based clients.
When the premailer script is run, it takes files ending in cr lf and adds an additional cr.
So it goes from:
<div class="row error">oickle</div>[CR][LF]
<span>hi</span>[CR][LF]
To:
<div style="background-color: #def; border-top: 1px solid #cde; margin: 10px -10px; padding: 5px 10px;">oickle</div>[CR]
[CR][LF]
<span>hi</span>[CR]
[CR][LF]
I was going to ignore this (because premailer is superawesome), but the SVN repo enforces consistent line endings so it has a cow.
Any way we could add a flag to stop the line ending modification? I'm not comfortable enough in ruby to not blow up ya'lls code.
They should be moved to the head if possible. To review: what's the specificity of media queries vs online styles? Can online styles have @media queries.
Trying to install via the gem on latest Ubuntu (10.10) gives:
mstevens@mstevens-desktop:~ % sudo gem install premailer
[sudo] password for mstevens:
Building native extensions. This could take a while...
ERROR: Error installing premailer:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1
Gem files will remain installed in /var/lib/gems/1.8/gems/hpricot-0.8.3 for inspection.
Results logged to /var/lib/gems/1.8/gems/hpricot-0.8.3/ext/fast_xs/gem_make.out
I processed http://webmagicsouth.co.uk/WCCH/mar11news/news3.html which looks fine when I insert HTML in a Thunderbird message but the text, which has been formated as multiple spans by Xara Web Designer 6 consistently mangles theis text.
I have tried hard line breaks, stripping out the Head section entirely and removing all the Class instructions but all with the same results
Title says it all.. getting two question marks instead of one when I append query strings. I'm not including a ? in my string.
In Outlook 2007+, a lot of table-based layouts break, unless you add a WIDTH
attribute to the <TD>
elements of the top <TR>
row containing transparent spacer GIFs. The GIFs already have the width set, but for some reason in Outlook '07 you need to set it in the <TD>
elements as well.
It'd be awesome if there was an option for premailer to automatically add width attributes to the first row of table cells that contained spacer GIFs.
There seems to be a bug with base_url where it is always set to "nil". When I call:
When I call:
$ premailer http://www.google.com/ --base-url www.google.com -v
I get:
Processing in html mode with options {:remove_classes=>false, :line_length=>65, :verbose=>true, :base_url=>nil, :link_query_string=>nil}
I managed to fix this issue with the following code change (premiler/bin/premailer
lines 34-36):
opts.on("-b", "--base-url STRING", String, "Base URL, useful for local files") do |v|
options[:base_url] = v
end
I'm running Mac OS 10.6.4 and Ruby:
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
Hi,
It appears that CSS on 'a' tags is not premailed...
The following input
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
.email {
color: #005078;
font-size: 12px;
font-family: Arial, Helvetica, sans-serif, Verdana;
font-weight: bold;
</style>
</head>
<body>
<a href="mailto:[email protected]" class="email">[email protected]</a>
</body>
</html>
produces:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
<a href="mailto:[email protected]" class="email">[email protected]</a>
</body>
</html>
The correct result should be
<a href="mailto:[email protected]" class="email" style="color: #005078; font-size: 12px; font-family: Arial, Helvetica, sans-serif, Verdana; font-weight: bold;">[email protected]</a>
Thanks a lot,
dstj.
[using version 1.6.1]
Some email apps uses defined strings to replace utilitary links like web version or unsubscribe link.
I need to remain this strings untouched, example:
to unsubscribe <a href="%%unsubscribe%%" >click here</a>
is converted to
to unsubscribe <a href="http://www.example.com/folder/%25%25unsubscribe%25%25" >click here</a>
is there a way to prevent this from parsing?
Running the example code is generating a lot of Chinese characters in my HTML! No idea what's going on. Any ideas?
Nokogiri converts entities to the actual chars. It shouldn't.
Hello,
I'm really new in ruby but I need to use the premailer ruby
library/binary. I'd like excuting this binary for PHP.
I have installed latest ruby version in debian and then I have installed
libraries through gem. When I execute command in console with user root
or user www-data it's fine.
The problem is that when I call to ruby binary from PHP-Apache (exec,
system, shell_exec) ruby throws a segmentation fault in hpricot library.
Ruby version 1.9.2p0
Rubygems version 1.3.7
Hpricot version is 0.8.3
Premailer version 1.6.2
This is the error:
/usr/local/lib/ruby/gems/1.9.1/gems/hpricot-0.8.3/lib/hpricot/parse.rb:33:
[BUG] Segmentation fault
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]
-- control frame ----------
c:0010 p:---- s:0046 b:0046 l:000045 d:000045 CFUNC :scan
c:0009 p:0074 s:0041 b:0041 l:000040 d:000040 METHOD
/usr/local/lib/ruby/gems/1.9.1/gems/hpricot-0.8.3/lib/hpricot/parse.rb:33
c:0008 p:0030 s:0034 b:0034 l:000033 d:000033 METHOD
/usr/local/lib/ruby/gems/1.9.1/gems/hpricot-0.8.3/lib/hpricot/parse.rb:4
c:0007 p:0123 s:0028 b:0028 l:000027 d:000027 METHOD
/usr/local/lib/ruby/gems/1.9.1/gems/premailer-1.6.2/lib/premailer/premailer.rb:292
c:0006 p:0264 s:0023 b:0023 l:000022 d:000022 METHOD
/usr/local/lib/ruby/gems/1.9.1/gems/premailer-1.6.2/lib/premailer/premailer.rb:142
c:0005 p:---- s:0018 b:0018 l:000017 d:000017 FINISH
c:0004 p:---- s:0016 b:0016 l:000015 d:000015 CFUNC :new
c:0003 p:0263 s:0011 b:0011 l:000698 d:0000d0 EVAL
/usr/local/lib/ruby/gems/1.9.1/gems/premailer-1.6.2/bin/premailer:87
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
/usr/local/lib/ruby/gems/1.9.1/gems/premailer-1.6.2/bin/premailer:87:in
<main>' /usr/local/lib/ruby/gems/1.9.1/gems/premailer-1.6.2/bin/premailer:87:in
new'
/usr/local/lib/ruby/gems/1.9.1/gems/premailer-1.6.2/lib/premailer/premailer.rb:142:in
initialize' /usr/local/lib/ruby/gems/1.9.1/gems/premailer-1.6.2/lib/premailer/premailer.rb:292:in
load_html'
/usr/local/lib/ruby/gems/1.9.1/gems/hpricot-0.8.3/lib/hpricot/parse.rb:4:in
Hpricot' /usr/local/lib/ruby/gems/1.9.1/gems/hpricot-0.8.3/lib/hpricot/parse.rb:33:in
make'
/usr/local/lib/ruby/gems/1.9.1/gems/hpricot-0.8.3/lib/hpricot/parse.rb:33:in
`scan'
ruby(rb_vm_bugreport+0xa9) [0x52b1a9]
ruby [0x56ea56]
ruby(rb_bug+0xb1) [0x56ebd1]
ruby [0x4b93ff]
/lib/libpthread.so.0 [0x7f9e39b6ba80]
/usr/local/lib/ruby/gems/1.9.1/gems/hpricot-0.8.3/lib/hpricot_scan.so(hpricot_scan+0x240)
[0x7f9e382fdd70]
ruby [0x51e007]
ruby [0x51f5a9]
ruby [0x524858]
ruby [0x51ad5a]
ruby(rb_class_new_instance+0x32) [0x455302]
ruby [0x51e007]
ruby [0x51f5a9]
ruby [0x524858]
ruby(rb_iseq_eval_main+0x288) [0x524bd8]
ruby [0x41a753]
ruby(ruby_run_node+0x36) [0x41c446]
ruby(main+0x4d) [0x41999d]
/lib/libc.so.6(__libc_start_main+0xe6) [0x7f9e38f601a6]
ruby [0x419889]
Thanks in advance.
HTML coming from the wild can have that same ID used multiple times. It would be nice if Premailer could deal with that.
First, let me say how great Premailer is and thank you. You have saved me countless hours!
I typically build my HTML email layouts with XHTML Transitional doctype and I have had good results. In the past Premailer had no problems and happily made my images paths absolute and my CSS inline. Life was good. Now it looks like premailer is getting more aggressive and is rewriting such tags as BR and IMG so they are not closed in XHTML. Now am getting lots of validation errors. I am not sure if this is a "feature" or a "bug". If a feature could this be made an option?
It would be really nice if there was an option to parse inline html as a string instead of reading a file. I'm loading in mailing templates from the database so having to initialize premailer from a path is an extra step
I wanted to process http://www.plusleo.nl/nieuwsbrieven/nieuwsbrief22.html but got an empty response. No warnings, no errors, just a page without results.
Trying to fix Adapter polluting the global namespace, but the tests aren't passing. Any ideas?
Failure:
test_style_expanding(TestMisc)
[./test/test_misc.rb:41:in test_style_expanding' ./test/test_misc.rb:37:in
each'
./test/test_misc.rb:37:in `test_style_expanding']:
<"border: none; border-left: 1px solid black;"> expected to be =~
</border: none;\Z/i>.
Failure:
test_preserving_special_characters_hpricot(TestPremailer) [./test/test_premailer.rb:50]:
<"c\303\251dille cé & gar\303\247on garçon \303\240 à &"> expected but was
<"cédille cé & garçon garçon à à &">.
54 tests, 175 assertions, 2 failures, 0 errors
$ rvm use ree
Using ~/.rvm/gems/ree-1.8.7-2011.03
$ git checkout upstream/master
Note: checking out 'upstream/master'.
HEAD is now at 5024c1f... Don't convert links starting with percentage signs -- closes GH-51
$ rake test
(in ~/premailer)
Loaded suite ~/.rvm/gems/ree-1.8.7-2011.03/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
..................F....output error : unknown encoding ASCII-8BIT
Eoutput error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
Foutput error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
Foutput error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
Foutput error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
Foutput error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
.output error : unknown encoding ASCII-8BIT
Eoutput error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
Foutput error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
Eoutput error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
.output error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
Foutput error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
Foutput error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
Eoutput error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
Foutput error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
.output error : unknown encoding ASCII-8BIT
~/.rvm/gems/ree-1.8.7-2011.03/gems/nokogiri-1.4.4/lib/nokogiri/xml/node.rb:617: [BUG] Segmentation fault
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10.6.0], MBARI 0x6770, Ruby Enterprise Edition 2011.03
rake aborted!
Command failed with status (): [~/.rvm/rubies/ree-1.8.7...]
(See full trace by running task with --trace)
$ rake test
61 tests, 127 assertions, 19 failures, 12 errors
Foutput error : unknown encoding ASCII-8BIT
output error : unknown encoding ASCII-8BIT
Why are there so many test errors?
Hi there, and first of all thanks for your nice library!
I came across the following issue: https://gist.github.com/1089280
As you can see in output, the xmlns element is duplicated, I guess thats a bug, but not sure if in premailer or nokogiri.
In addition, one more side question, just out of interest: I noticed that with 1.6.x I had the problem that premailer added display:none to a lot of elements, and I did not really understand why - now with 1.7.1 this seems to be gone, was this a known issue?
Thank you,
Christoph
Given
<td class="special"><p>...</p></td>
this style declaration will render a border-left after running through premailer
td { border-left: 1px solid black; }
td.special { border: none; }
and this will not render a padding-left after running through premailer
td p { padding: 0; }
td.special p { padding-left: 10px; }
It's easy enough to work around, but I thought I'd mention it since it's not the expected behavior.
For Outlook.
Hey there, minor issue, but premailer returns nothing in txt mode if the input does not contain a valid HTML structure. It would be preferable if it simply returned the original input instead.
Hi,
first of all, great work, i really appreciate premailer!
Here my problem:
in Version 1.6.2 the automatic line-format does not work any more. Here is the output of premailer with -v:
Processing in txt mode with options {:line_length=>65, :verbose=>true, :base_url=>nil, :link_query_string=>nil, :remove_classes=>false}
But the Text-Version doesn't contain any newlines. I reinstalled version premailer-1.5.4 and there everything workes fine.
I am working on Suse 11.2
Best regards
Andreas
Hey,
I noticed inside the client_support.yaml
there is a list of unsupported elements such as form
.
These do not show up in the warnings hash when I run Premailer on the following html:
<style>form { border: 1px solid black; }</style>
<form><button>test</button></form>
Is this a bug?
Thanks!
When Premailer converts this HTML in my code:
....
it drops the closing </h3> tag:
Full Input HTMLand output HTML are available.
here is why:
https://github.com/hpricot/hpricot/issues#issue/39
I have the same issue over and over as well wether it apache, cront, etc.. Hpricot is very unstable,
Premailer converts [& copy ;](without spaces) to ©, [& quot ;] to ", [& amp ;] to &.. and I can't imagine a use case where this would be helpful. I've emailed Alex about this and I believe he told me that some people want it different ways.
I don't get it - this takes a perfectly-validated email transmission, and leaves with potentially hundreds of validation errors.
It makes premailer no-longer a useful tool for us, and I imagine most people, at all.
WHO are the people that told Alex they needed premailer to behave like this? Are they a majority?
Premailer Error
Oh no! An error occurred when processing .
Server says: This is nowhere to be found.
If you're so inclined, you can report the error on GitHub. Please be sure to include the URL causing the problems.
I GOT THIS ERROR MESSAGES FOR THE LAST 2 TRIES OF USING PREMAILER. I HAVE BEEN USING IT FOR LONG TIME AND ALWAYS WORKED JUST GREAT BUT AFTER SITE CHANGE I STARTED GETTING THIS MESSAGE FROM TIME TO TIME. HOW CAN I FIX IT ? THERE IS NO TIP IN TE ERROR MESSAGE.
THIS IS THE CODE I HAVE SUBMITED AND CHOOSED TO REMOVE STYLE AND LINK ELEMENTS.
<title>Bleecker Happens</title> <style type="text/css"> </style>sexta 11 | OS OPALAS | Samba Rock Soul |
|
|
|
sábado 12 | JAM SUBURBANA |
|
|
|
EVENTOS | FESTAS | ANIVERSÁRIOS Infra estrutura completa para shows, eventos, apresentações, coqueteis. Clique na imagem e veja algumas sugestões de pacotes! |
|
E.g., "<br />" is being converted to "<br>".
The line:
if tag.attributes[attribute] =~ /^({|[|<|#|mailto:|ftp:|gopher:)/i
should change to:
if tag.attributes[attribute].to_s =~ /^({|[|<|#|mailto:|ftp:|gopher:)/i
.to_s is necessary there.
Also, I added "tel:" to the pattern match list.
$ rvm use 1.9.2
Using ~/.rvm/gems/ruby-1.9.2-p180
$ rake test
(in ~/premailer)
Loaded suite ~/.rvm/gems/ruby-1.9.2-p180/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
..................F....EFEFEEEF.<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=macintosh">
<body>
<p class="quote"> a must-read for fans.<br>
</p>
</body>
</head>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=macintosh">
<body>
<p class="quote"> a must-read for fans.<br>
</p>
</body>
</head>
</html>
.EEE..EFE.EEE
And infinite wait...
Hello,
I' using premailer 4-5 months ago and it's very good. But now I have found a possible bug.
With an specific HTML, http://www.certiseg.com/arbolweb/campanas/promocion_cursos_calendario.htm, that has incorrect HTML structure because it has a < strong > tag between < / td > and < td > then premailer close the first table tag before strong tag so the rest of HTML is not into the table and rendering incorrectly.
We are using premailer 1.5.4 in console installed with gem but if I use the online test in http://premailer.dialect.ca/ the result is good and HTML is not broken. Do you have any suggestions to solve this problem?
Can I download older version gem?
Thanks in advance, Jesús.
h1{ color: #fff !important }
becomes
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.