Replace special characters with html entity hex codes.