escape all occurrences of reserved chars

fixes #345