galakei 0.14.3 → 0.14.4

Sign up to get free protection for your applications and to get access to all the features.
data/lib/galakei/email.rb CHANGED
@@ -43,7 +43,7 @@ module Galakei::Email
43
43
  end
44
44
  doc.css("img").each do |node|
45
45
  if node['src'] !~ /^cid:/
46
- node.after(node['alt']) if node['alt']
46
+ node.after(doc.create_text_node(node['alt'])) if node['alt'].present?
47
47
  node.unlink
48
48
  end
49
49
  end
@@ -1,4 +1,4 @@
1
1
  module Galakei
2
2
  # The version of Galakei you are using
3
- VERSION = "0.14.3"
3
+ VERSION = "0.14.4"
4
4
  end
@@ -43,7 +43,7 @@ GREEEEEEN
43
43
  <img src="http://someurl.com/someimage.png"/>
44
44
  <a href="http://dragonmobile.nuancemobiledeveloper.com/"><img src="cid:image-attachment-id" alt=""/></a>this was an image
45
45
  <br/>
46
- This is <img src="http://someurl.com/someimage.png" alt="someimage"/>...
46
+ This is <img src="http://someurl.com/someimage.png" alt="イメジー"/>...
47
47
  And now, <a href="ftp://some.ftpsite.com/">Downloadz youz warez herez!</a>
48
48
  </html>
49
49
  EOT
@@ -73,7 +73,7 @@ describe Galakei::Email do
73
73
  it "should handle images" do
74
74
  sanitized_mail.should =~ /<img src=.*cid/m
75
75
  sanitized_mail.should_not =~ /<img src=.*http/m
76
- sanitized_mail.should match("This is someimage...")
76
+ sanitized_mail.should match("This is イメジー...")
77
77
  end
78
78
 
79
79
  it "should not have unsupported protocols" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: galakei
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.3
4
+ version: 0.14.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-07-13 00:00:00.000000000 Z
14
+ date: 2012-07-15 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: actionpack