Improved apostrophe escaping.