escape plaintext properly