ishapi 0.1.8.226 → 0.1.8.228

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '08f76fb6660101b8dc3a094ed09385796a0daf9e1902382fa11f59cd4720bba3'
4
- data.tar.gz: c7e2003493c0fc07c65b67b7a28d76a889c4e6f894cd645afeb941c5a29146c6
3
+ metadata.gz: bc1b3b3f0135c949017fc252c95e6f365b88e6bc9e604974dad19286ea15769e
4
+ data.tar.gz: 16e8e1a82ecdde6db2f0781ddfde505f0b45f3833dd68140f23998702943b61e
5
5
  SHA512:
6
- metadata.gz: 6ffe3656e44c4aa750648d3403824936d6c3f0c06b9e23c904839d0c88dd02db1d8cf8c6200fe4cf9468063be6107c107948406a102954e6e453c771da8a2d97
7
- data.tar.gz: 7bbe8d993cae95069b3c4767ee60443e3bd39db16292be6616c17a5cd5af34653f18473e24f009a0f4131ddcdc43c5151e5dbe00fe315269ecc7b30d352e8355
6
+ metadata.gz: bb2a06cc1818b405f9da1c1b0594fb2b1963a03e475285e4b22a05effe6c9794a458ac1276c9b57dbb70dc9f55783903c7a1ed59722bb3ab29109988777cace7
7
+ data.tar.gz: 8e978ade2a506007f7947a564ed41864b49ff003aa0b3c320d1475a704f6fbd643117ab0c4274d42e65a840081d823b03f722613c2344f9261594ad1ab05b842
@@ -13,12 +13,14 @@ class ::Ishapi::EmailMessagesController < ::Ishapi::ApplicationController
13
13
  if params[:load_images]
14
14
  ;
15
15
  else
16
- doc = Nokogiri::HTML(@msg.part_html)
17
- images = doc.search('img')
18
- images.each do |img|
19
- img['src'] = 'missing'
16
+ if @msg.part_html
17
+ doc = Nokogiri::HTML(@msg.part_html)
18
+ images = doc.search('img')
19
+ images.each do |img|
20
+ img['src'] = 'missing'
21
+ end
22
+ @msg.part_html = doc
20
23
  end
21
- @msg.part_html = doc
22
24
  end
23
25
 
24
26
  respond_to do |format|
@@ -1,3 +1,10 @@
1
1
 
2
2
  %html
3
- %body{ style: 'background: white' }= raw @msg.part_html || @msg.part_txt
3
+ %body{ style: 'background: white' }
4
+ - if @msg.part_html
5
+ = raw( @msg.part_html )
6
+ - elsif @msg.part_txt
7
+ %pre
8
+ = @msg.part_txt
9
+ - else
10
+ Neither part_html nor part_txt!
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ishapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.226
4
+ version: 0.1.8.228
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox