lib/bootstrap-email/converters/force_encoding.rb in bootstrap-email-1.0.0.alpha3.1 vs lib/bootstrap-email/converters/force_encoding.rb in bootstrap-email-1.0.0.alpha4

- old
+ new

@@ -1,16 +1,14 @@ module BootstrapEmail module Converter class ForceEncoding < Base - def build - body = doc.at_css('body') - body.add_child('<force-encoding></force-encoding>') - end - def self.replace(html) # force utf-8 character encoded in iOS Mail: https://github.com/bootstrap-email/bootstrap-email/issues/50 - # this needs to be done after the document has been outputted to a string so it doesn't get converted - html.sub('<force-encoding></force-encoding>', '<div id="force-encoding-to-utf-8" style="display: none;">&#10175;</div>') + # this needs to be done after the document has been outputted to a ascii string so it doesn't get converted + html.sub( + '<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">', + '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">' + ) end end end end