Replace special characters in tag name