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 +4 -4
- data/CHANGELOG.md +3 -0
- data/letter_opener.gemspec +1 -1
- data/lib/letter_opener/message.html.erb +1 -1
- data/lib/letter_opener/message.rb +1 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 791bc4430c69cf7cd36b26cc8f8c610f9b1206cc
|
4
|
+
data.tar.gz: 948b12833885db1d6e51c8d594dc3193c800f296
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 115a513680145c304e82e56530ea8f36c9555ce7714be0316f614bc7cafe2bf43dfc00af01c0b21977863d4e17df32275ad27033affdace860b43b33171dce7a
|
7
|
+
data.tar.gz: c846117e41eefde83358fc04ab8f30e11580d9311ca6c4e2b4ed725a0245ef858f956cf933a04e6f8d232f85b52643db0b28a0c46e22afe4323705f115f54435
|
data/CHANGELOG.md
CHANGED
@@ -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.
|
data/letter_opener.gemspec
CHANGED
@@ -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="
|
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
|
-
|
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.
|
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-
|
11
|
+
date: 2015-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: launchy
|