letter_opener 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c17edf454562b845730e2bc785489ab61cc5d2a9
4
- data.tar.gz: 9103feb34675d63486efea05fbb3cb0bcdc12ec0
3
+ metadata.gz: 791bc4430c69cf7cd36b26cc8f8c610f9b1206cc
4
+ data.tar.gz: 948b12833885db1d6e51c8d594dc3193c800f296
5
5
  SHA512:
6
- metadata.gz: 0de0bce58674322df7867f93fdf3b01795c399bdec2dc68fc027ce299f656936159f6091a2063cc90cd1b0baf64ba0d1cd3e4e89d983ddb766265b10baf4f8b8
7
- data.tar.gz: 1627f2a90df1e62f402cf015dd5ca8cb75049008f5afbea38bb96855408236e9abf2d0d91c364e3d35ff2f4c6090b2356893bcc5b838beab24589bd1fc2bde5a
6
+ metadata.gz: 115a513680145c304e82e56530ea8f36c9555ce7714be0316f614bc7cafe2bf43dfc00af01c0b21977863d4e17df32275ad27033affdace860b43b33171dce7a
7
+ data.tar.gz: c846117e41eefde83358fc04ab8f30e11580d9311ca6c4e2b4ed725a0245ef858f956cf933a04e6f8d232f85b52643db0b28a0c46e22afe4323705f115f54435
@@ -1,3 +1,6 @@
1
+ ## 1.4.1 ##
2
+ * Stop base tag appearing in plain-text previews. (thanks [Coby Chapple](https://github.com/cobyism))
3
+
1
4
  ## 1.4.0 ##
2
5
  * Add base tag to the iframe so links work with X-Frame-Options set to SAMEORIGIN. (thanks [Jason Tokoph](https://github.com/jtokoph))
3
6
  * Check delivery params before rendering an email to match SMTP behaviour.
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "letter_opener"
3
- s.version = "1.4.0"
3
+ s.version = "1.4.1"
4
4
  s.author = "Ryan Bates"
5
5
  s.email = "ryan@railscasts.com"
6
6
  s.homepage = "http://github.com/ryanb/letter_opener"
@@ -124,7 +124,7 @@
124
124
  <% if type == "plain" %>
125
125
  <pre id="message_body"><%= auto_link(h(body)) %></pre>
126
126
  <% else %>
127
- <iframe seamless="seamless" srcdoc="<%= h(body) %>"></iframe>
127
+ <iframe seamless="seamless" srcdoc="<base target='_top'><%= h(body) %>"></iframe>
128
128
  <% end %>
129
129
  </div>
130
130
  </body>
@@ -63,7 +63,7 @@ module LetterOpener
63
63
  body.gsub!(attachment.url, "attachments/#{attachment.filename}")
64
64
  end
65
65
 
66
- base_tag + body
66
+ body
67
67
  end
68
68
  end
69
69
 
@@ -99,11 +99,6 @@ module LetterOpener
99
99
  body.respond_to?(:encoding) ? body.encoding : "utf-8"
100
100
  end
101
101
 
102
- # To make links work in iframe with X-Frame-Options set to SAMEORIGIN
103
- def base_tag
104
- '<base target="_top">'
105
- end
106
-
107
102
  def auto_link(text)
108
103
  text.gsub(URI.regexp(%W[https http])) do |link|
109
104
  "<a href=\"#{ link }\">#{ link }</a>"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: letter_opener
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Bates
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-09 00:00:00.000000000 Z
11
+ date: 2015-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: launchy