correctly escapes strings now
Merge pull request #4814 from zaggino/fix-for-pull-4686

Fix for already merged pull 4686.