// Token: 0x0600061F RID: 1567 RVA: 0x000307CC File Offset: 0x0002E9CC public static IList <AttachmentLink> GenerateNonEditableMessageBodyAndRenderInfobarMessages(Item item, TextWriter writer, OwaContext owaContext, Infobar infobar, bool allowWebBeacon, bool forceEnableItemLink, string itemType, string action, string state, bool isEmbedded, string attachmentUrl) { if (item == null) { throw new ArgumentNullException("item"); } if (writer == null) { throw new ArgumentNullException("writer"); } if (infobar == null) { throw new ArgumentNullException("infobar"); } if (owaContext == null) { throw new ArgumentNullException("owaContext"); } UserContext userContext = owaContext.UserContext; WebBeaconFilterLevels filterWebBeaconsAndHtmlForms = userContext.Configuration.FilterWebBeaconsAndHtmlForms; bool flag = false; bool flag2 = false; bool flag3 = false; bool flag4 = false; JunkEmailUtilities.GetJunkEmailPropertiesForItem(item, isEmbedded, forceEnableItemLink, userContext, out flag, out flag2, out flag3, out flag4); OwaSafeHtmlCallbackBase owaSafeHtmlCallbackBase; if (!flag4) { if (filterWebBeaconsAndHtmlForms == WebBeaconFilterLevels.DisableFilter || allowWebBeacon || Utilities.IsWebBeaconsAllowed(item)) { owaSafeHtmlCallbackBase = new OwaSafeHtmlAllowWebBeaconCallbacks(item, userContext.IsPublicLogon, isEmbedded, attachmentUrl, owaContext, false); } else { owaSafeHtmlCallbackBase = new OwaSafeHtmlOutboundCallbacks(item, userContext.IsPublicLogon, isEmbedded, attachmentUrl, false, owaContext, false); } } else { owaSafeHtmlCallbackBase = new OwaSafeHtmlOutboundCallbacks(item, userContext.IsPublicLogon, isEmbedded, attachmentUrl, true, owaContext, false); } BodyConversionUtilities.RenderReadBody(writer, item, owaSafeHtmlCallbackBase, flag4); bool hasBlockedImages = owaSafeHtmlCallbackBase.HasBlockedImages; if (flag) { if (flag2) { infobar.AddMessageText(LocalizedStrings.GetNonEncoded(1581910613) + " " + LocalizedStrings.GetNonEncoded(614784743), InfobarMessageType.Phishing); } else if (userContext.IsJunkEmailEnabled) { infobar.AddMessageText(LocalizedStrings.GetNonEncoded(59853257) + " " + LocalizedStrings.GetNonEncoded(385373859), InfobarMessageType.JunkEmail); } } else if (flag2 && !flag3) { string s = string.Format(CultureInfo.InvariantCulture, "<a id=\"aIbBlk\" href=\"#\" onclick=\"return onClkBm('{0}', 1, 0)\">{1}</a> {2} ", new object[] { itemType, LocalizedStrings.GetHtmlEncoded(-672110188), LocalizedStrings.GetHtmlEncoded(-1020475744) }); string format = "<a href=\"#\" onClick=opnHlp('" + Utilities.JavascriptEncode(Utilities.BuildEhcHref(HelpIdsLight.EmailSafetyLight.ToString())) + "')>{0}</a>"; string s2 = string.Format(CultureInfo.InvariantCulture, format, new object[] { LocalizedStrings.GetHtmlEncoded(338562664) }); infobar.AddMessageHtml(SanitizedHtmlString.Format("{0}{1}{2}", new object[] { LocalizedStrings.GetNonEncoded(1581910613), SanitizedHtmlString.GetSanitizedStringWithoutEncoding(s), SanitizedHtmlString.GetSanitizedStringWithoutEncoding(s2) }), InfobarMessageType.Phishing); } else if (hasBlockedImages) { if (filterWebBeaconsAndHtmlForms == WebBeaconFilterLevels.UserFilterChoice) { string s3 = string.Format(CultureInfo.InvariantCulture, "<a id=\"aIbBlk\" href=\"#\" onclick=\"return onClkBm('{0}', 1, 1);\">{1}</a>", new object[] { itemType, LocalizedStrings.GetHtmlEncoded(469213884) }); infobar.AddMessageHtml(SanitizedHtmlString.Format(LocalizedStrings.GetHtmlEncoded(2063285740), new object[] { SanitizedHtmlString.GetSanitizedStringWithoutEncoding(s3) }), InfobarMessageType.Informational); } else if (filterWebBeaconsAndHtmlForms == WebBeaconFilterLevels.ForceFilter) { infobar.AddMessageLocalized(-1196115124, InfobarMessageType.Informational); } } if (owaSafeHtmlCallbackBase.HasRtfEmbeddedImages) { infobar.AddMessageLocalized(1338319428, InfobarMessageType.Informational); } return(owaSafeHtmlCallbackBase.AttachmentLinks); }