Escape all fields, and do it properly.
Merge pull request #81 from Metaswitch/iss80

[Reviewer: Andy] Escape all fields, and do it properly.