[Fix #1724] Ensure that printed json is safe
This commit is contained in:
parent
c670c0fbea
commit
8c1c2f32ca
4 changed files with 51 additions and 3 deletions
|
@ -30,4 +30,11 @@ module ApplicationHelper
|
|||
root_path
|
||||
end
|
||||
end
|
||||
|
||||
def ensure_safe_json(json)
|
||||
JSON.parse(json).to_json
|
||||
rescue Exception => e
|
||||
Raven.capture_exception(e)
|
||||
{}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue