Escape quotes in strings properly. Fixes #1768.
Merge pull request #1791 from jotomo/1768-expoter-escape-quotes

Escape quotes in strings properly. Fixes #1768.