Skip to content

Commit

Permalink
Fix rubocop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
cheremukhin23 committed Apr 1, 2017
1 parent 68044df commit a3ef532
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/helpers/react_on_rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def escape_json(json)
end

def old_json_escape(json)
json_escape = { '&' => '\u0026', '>' => '\u003e', '<' => '\u003c', "\u2028" => '\u2028', "\u2029" => '\u2029' }
json_escape = { "&" => '\u0026', ">" => '\u003e', "<" => '\u003c', "\u2028" => '\u2028', "\u2029" => '\u2029' }
json_escape_regexp = /[\u2028\u2029&><]/u
json.to_s.gsub(json_escape_regexp, json_escape)
end
Expand Down

0 comments on commit a3ef532

Please sign in to comment.