private static void escapeInvalidHtml(object sender, TagFormattedEventArgs e) { if (e.IsExtension) { // Do not escape text within triple curly braces return; } e.Substitute = SecurityElement.Escape(e.Substitute); }
private void postProcess(Substitution substitution) { if (TagFormatted == null) { return; } TagFormattedEventArgs args = new TagFormattedEventArgs(substitution.Key, substitution.Substitute, substitution.IsExtension); TagFormatted(this, args); substitution.Substitute = args.Substitute; }