sanitize 2.0.0.dev.20101211 → 2.0.0.dev.20101213

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.

Potentially problematic release.


This version of sanitize might be problematic. Click here for more details.

@@ -34,8 +34,11 @@ class Sanitize; module Transformers
34
34
  # Elements like br, div, p, etc. need to be replaced with whitespace in
35
35
  # order to preserve readability.
36
36
  if @whitespace_elements[name]
37
- node.add_previous_sibling(' ')
38
- node.add_next_sibling(' ') unless node.children.empty?
37
+ node.add_previous_sibling(Nokogiri::XML::Text.new(' ', node.document))
38
+
39
+ unless node.children.empty?
40
+ node.add_next_sibling(Nokogiri::XML::Text.new(' ', node.document))
41
+ end
39
42
  end
40
43
 
41
44
  unless @remove_all_contents || @remove_element_contents[name]
@@ -1,3 +1,3 @@
1
1
  class Sanitize
2
- VERSION = '2.0.0.dev.20101211'
2
+ VERSION = '2.0.0.dev.20101213'
3
3
  end
metadata CHANGED
@@ -7,8 +7,8 @@ version: !ruby/object:Gem::Version
7
7
  - 0
8
8
  - 0
9
9
  - dev
10
- - 20101211
11
- version: 2.0.0.dev.20101211
10
+ - 20101213
11
+ version: 2.0.0.dev.20101213
12
12
  platform: ruby
13
13
  authors:
14
14
  - Ryan Grove
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-12-11 00:00:00 -08:00
19
+ date: 2010-12-13 00:00:00 -08:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency