added escaping to saving of "old" data for revisions