Example #1
0
 // Token: 0x060003E0 RID: 992 RVA: 0x0000E8BC File Offset: 0x0000CABC
 private static void SanitizeMailTips(ADRecipient recipient)
 {
     if (recipient.MailTipTranslations != null)
     {
         bool isReadOnly = recipient.IsReadOnly;
         if (isReadOnly)
         {
             recipient.SetIsReadOnly(false);
         }
         for (int i = 0; i < recipient.MailTipTranslations.Count; i++)
         {
             string str;
             string text;
             if (ADRecipient.TryGetMailTipParts(recipient.MailTipTranslations[i], out str, out text) && !string.IsNullOrEmpty(text))
             {
                 using (StringReader stringReader = new StringReader(text))
                 {
                     using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
                     {
                         HtmlToHtml htmlToHtml = new HtmlToHtml();
                         htmlToHtml.SetPreserveDisplayNoneStyle(true);
                         htmlToHtml.InputEncoding  = Encoding.UTF8;
                         htmlToHtml.OutputEncoding = Encoding.UTF8;
                         htmlToHtml.FilterHtml     = true;
                         htmlToHtml.Convert(stringReader, stringWriter);
                         string str2 = stringWriter.ToString();
                         recipient.MailTipTranslations[i] = str + ":" + str2;
                     }
                 }
             }
         }
         if (isReadOnly)
         {
             recipient.SetIsReadOnly(true);
         }
     }
 }
Example #2
0
 public static void SetPreserveDisplayNoneStyle(HtmlToHtml conversion, bool preserve)
 {
     conversion.SetPreserveDisplayNoneStyle(preserve);
 }