Skip to content

Commit

Permalink
beginning of string instead of beginning of line for bom match
Browse files Browse the repository at this point in the history
  • Loading branch information
jnunemaker committed Apr 21, 2017
1 parent 60aa11a commit 7075004
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/httparty/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def xml
UTF8_BOM = "\xEF\xBB\xBF".freeze

def json
JSON.parse(body.gsub(/^#{UTF8_BOM}/, ''), :quirks_mode => true, :allow_nan => true)
JSON.parse(body.gsub(/\A#{UTF8_BOM}/, ''), :quirks_mode => true, :allow_nan => true)
end

def csv
Expand Down

0 comments on commit 7075004

Please sign in to comment.