Skip to content

Commit

Permalink
Force encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
eval committed Aug 28, 2012
1 parent 99217ad commit f1ff53c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/rack/pjax.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def call(env)
if pjax?(env)
new_body = ""
body.each do |b|
b.force_encoding('UTF-8') if RUBY_VERSION > '1.9.0'
parsed_body = Nokogiri::HTML(b)
container = parsed_body.at("[@data-pjax-container]")
if container
Expand Down

0 comments on commit f1ff53c

Please sign in to comment.