static void Sanitize(IHtmlNode rootNode, IDictionary<string, string[]> whiteList) { CleanNodes(rootNode.Children, whiteList); if(whiteList.ContainsKey(rootNode.Name)) CleanAttributes(rootNode.Attributes, whiteList[rootNode.Name]); }