Permalink
Browse files

remote CSS fallback nil check

more flexible body structure
  • Loading branch information...
1 parent f54f166 commit 6d8d02acd5d34e8a5260de67cb33d81b0720a983 @iloveitaly committed Aug 23, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/premailer/premailer.rb
View
4 lib/premailer/premailer.rb
@@ -36,7 +36,7 @@ class Premailer
CLIENT_SUPPORT_FILE = File.dirname(__FILE__) + '/../../misc/client_support.yaml'
RE_UNMERGABLE_SELECTORS = /(\:(visited|active|hover|focus|after|before|selection|target|first\-(line|letter))|^\@)/i
- RE_RESET_SELECTORS = /^(\:\#outlook|body|\.ReadMsgBody|\.ExternalClass|img|\#backgroundTable)$/
+ RE_RESET_SELECTORS = /^(\:\#outlook|body.*|\.ReadMsgBody|\.ExternalClass|img|\#backgroundTable)$/
# list of CSS attributes that can be rendered as HTML attributes
#
@@ -217,7 +217,7 @@ def load_css_from_html! # :nodoc:
end
# if the file does not exist locally, try to grab the remote reference
- if not File.exists?(link_uri)
+ if link_uri.nil? or not File.exists?(link_uri)
link_uri = Premailer.resolve_link(tag.attributes['href'].to_s, @html_file)
end

0 comments on commit 6d8d02a

Please sign in to comment.