protected void ProcessImageTag(HtmlTagContextAttribute filterAttribute, HtmlTagContext context, HtmlWriter writer) { AirSyncDiagnostics.Assert(context != null); string value = filterAttribute.Value; AttachmentLink attachmentLink = this.IsInlineReference(value); if (attachmentLink != null) { this.OutputInlineReference(filterAttribute, attachmentLink, writer); return; } if (SafeHtmlCallback.IsSafeUrl(filterAttribute.Value, filterAttribute.Id)) { filterAttribute.Write(); } }
protected static void ProcessMicrodataTag(bool writeTag, HtmlTagContext context, List <HtmlAttributeId> safeAttributes) { if (!writeTag) { context.DeleteTag(); return; } foreach (HtmlTagContextAttribute htmlTagContextAttribute in context.Attributes) { if (safeAttributes.Contains(htmlTagContextAttribute.Id)) { bool flag = true; if (htmlTagContextAttribute.Id == HtmlAttributeId.Href && !SafeHtmlCallback.IsSafeUrl(htmlTagContextAttribute.Value, htmlTagContextAttribute.Id)) { flag = false; } if (flag) { htmlTagContextAttribute.Write(); } } } }