Example #1
0
 /// <summary>
 /// Specifies that the given check is be performed on any attribute with the given name.
 /// </summary>
 /// <param name="rule"></param>
 /// <param name="attribute"></param>
 /// <param name="check"></param>
 /// <returns></returns>
 public static HtmlSanitizerTagRule CheckAttribute(this HtmlSanitizerTagRule rule, string attribute, HtmlSanitizerCheckType check)
 {
     rule.CheckAttributes[attribute] = check;
     return(rule);
 }
 public static HtmlSanitizerTagRule CheckAttribute(this HtmlSanitizerTagRule rule, string attribute, HtmlSanitizerCheckType check)
 {
     switch (check)
     {
     case HtmlSanitizerCheckType.Url:
         rule.CheckAttributeUrl(attribute);
         break;
     }
     return(rule);
 }