lib/css_parser/parser.rb in css_parser-1.7.0 vs lib/css_parser/parser.rb in css_parser-1.7.1

- old
+ new

@@ -531,10 +531,10 @@ # Strip comments and clean up blank lines from a block of CSS. # # Returns a string. def cleanup_block(block, options = {}) # :nodoc: # Strip CSS comments - utf8_block = block.encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: ' ') + utf8_block = block.encode('UTF-8', 'UTF-8', invalid: :replace, undef: :replace, replace: ' ') utf8_block = ignore_pattern(utf8_block, STRIP_CSS_COMMENTS_RX, options) # Strip HTML comments - they shouldn't really be in here but # some people are just crazy... utf8_block = ignore_pattern(utf8_block, STRIP_HTML_COMMENTS_RX, options)