Escape user input in json

This prevents broken json objects from being saved to the database.
Merge pull request #164 from mfairchild365/uploads-fix

Escape user input in json