Escape special characters in pre-compiled code generation