public PolicyHtmlAttribute AllowedAttribute(string name) { PolicyHtmlAttribute a = allowedAttributes.ContainsKey(name) ? allowedAttributes[name] : null, g = Policy.GlobalHtmlAttribute(name), c = Policy.CommonHtmlAttribute(name); if (a == null) { a = g; } else if (g != null) { MergerRules(a, g.AllowedRegExp, g.AllowedValues); } if (a != null && c != null) { MergerRules(a, c.AllowedRegExp, c.AllowedValues); } return(a); }