improved special character safety