lib/sanitize.rb in sanitize-3.1.0 vs lib/sanitize.rb in sanitize-3.1.1
- old
+ new
@@ -168,10 +168,10 @@
private
# Preprocesses HTML before parsing to remove undesirable Unicode chars.
def preprocess(html)
- html.to_s.dup
+ html = html.to_s.dup
unless html.encoding.name == 'UTF-8'
html.encode!('UTF-8',
:invalid => :replace,
:undef => :replace)