private string CleanUriForEmail(XUri uri) {
     uri = uri.AsPublicUri();
     string schemehostport = uri.SchemeHostPort;
     string pathQueryFragment = uri.PathQueryFragment;
     return schemehostport + pathQueryFragment.Replace(":", "%3A");
 }