From 63cde284c21daa8c75791f018fb21be50f5da30b Mon Sep 17 00:00:00 2001 From: Manu Raghavan Date: Wed, 24 Sep 2014 14:12:40 +0800 Subject: [PATCH 1/2] Patch inline_styles gem to not crash ... when user-input message bodies have unresolvable URIs. --- lib/mail_style/inline_styles.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/mail_style/inline_styles.rb b/lib/mail_style/inline_styles.rb index f45ded5..ef83241 100644 --- a/lib/mail_style/inline_styles.rb +++ b/lib/mail_style/inline_styles.rb @@ -162,7 +162,11 @@ def absolutize_url(url, base_path = '') [host,protocol].each{|r| original_url.gsub!(r,"") } host = protocol+host unless host[URI::regexp(%w[http https])] - url = URI.join host, base_path, original_url + begin + url = URI.join host, base_path, original_url + rescue => e + url = '' + end end url.to_s @@ -208,4 +212,4 @@ def self.included(receiver) end end -ActionMailer::Base.send :include, MailStyle::InlineStyles \ No newline at end of file +ActionMailer::Base.send :include, MailStyle::InlineStyles From 1adee7001400952ba775877f10053f4ef4423d7d Mon Sep 17 00:00:00 2001 From: Manu Raghavan Date: Wed, 24 Sep 2014 14:14:11 +0800 Subject: [PATCH 2/2] Update VERSION --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index c946ee6..7a9a049 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.6 +0.1.6.1