Sha256: e2025244690264af5d868317f346baf660341ed018fd0a5b4f27b6fc0e2cd2b4
Contents?: true
Size: 412 Bytes
Versions: 4
Compression:
Stored size: 412 Bytes
Contents
require 'premailer/adapter/nokogiri' Premailer::Adapter::Nokogiri.module_eval do # Patch load_html method to fix character encoding issues. def load_html(html) if RUBY_VERSION.to_f >= 1.9 html = html.force_encoding('UTF-8').encode! ::Nokogiri::HTML(html) {|c| c.recover } else # :nocov: ::Nokogiri::HTML(html, nil, 'UTF-8') {|c| c.recover } # :nocov: end end end
Version data entries
4 entries across 4 versions & 1 rubygems