Escape single-quote characters in strings