{"action":"created","issue":{"url":"https://api.github.com/repos/mganss/HtmlSanitizer/issues/40","labels_url":"https://api.github.com/repos/mganss/HtmlSanitizer/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/mganss/HtmlSanitizer/issues/40/comments","events_url":"https://api.github.com/repos/mganss/HtmlSanitizer/issues/40/events","html_url":"https://github.com/mganss/HtmlSanitizer/issues/40","id":98432811,"number":40,"title":"Allow specific class names","user":{"login":"icemanind","id":401480,"avatar_url":"https://avatars.githubusercontent.com/u/401480?v=3","gravatar_id":"","url":"https://api.github.com/users/icemanind","html_url":"https://github.com/icemanind","followers_url":"https://api.github.com/users/icemanind/followers","following_url":"https://api.github.com/users/icemanind/following{/other_user}","gists_url":"https://api.github.com/users/icemanind/gists{/gist_id}","starred_url":"https://api.github.com/users/icemanind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icemanind/subscriptions","organizations_url":"https://api.github.com/users/icemanind/orgs","repos_url":"https://api.github.com/users/icemanind/repos","events_url":"https://api.github.com/users/icemanind/events{/privacy}","received_events_url":"https://api.github.com/users/icemanind/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-31T17:14:33Z","updated_at":"2015-08-01T17:25:05Z","closed_at":"2015-08-01T16:40:46Z","body":"I know you can allow or disallow the class tag. It would be great if it were possible to be able to specify a list of valid class names. For example, if I wanted to allow the class tag and only allow the \"control\" class name, something like this:\r\n\r\n    var sanitizer = new HtmlSanitizer();\r\n    sanitizer.AllowedTags.Add(\"class\");\r\n    sanitizer.AllowedClassNames.Add(\"control\");\r\n    sanitizer.Sanitize(\"<div class=\\\"control\\\">\"); // Passes sanitation\r\n    sanitizer.Sanitize(\"<div class=\\\"tiger\\\">\"); // Should remove class \"tiger\"\r\n"},"comment":{"url":"https://api.github.com/repos/mganss/HtmlSanitizer/issues/comments/126938703","html_url":"https://github.com/mganss/HtmlSanitizer/issues/40#issuecomment-126938703","issue_url":"https://api.github.com/repos/mganss/HtmlSanitizer/issues/40","id":126938703,"user":{"login":"304NotModified","id":5808377,"avatar_url":"https://avatars.githubusercontent.com/u/5808377?v=3","gravatar_id":"","url":"https://api.github.com/users/304NotModified","html_url":"https://github.com/304NotModified","followers_url":"https://api.github.com/users/304NotModified/followers","following_url":"https://api.github.com/users/304NotModified/following{/other_user}","gists_url":"https://api.github.com/users/304NotModified/gists{/gist_id}","starred_url":"https://api.github.com/users/304NotModified/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/304NotModified/subscriptions","organizations_url":"https://api.github.com/users/304NotModified/orgs","repos_url":"https://api.github.com/users/304NotModified/repos","events_url":"https://api.github.com/users/304NotModified/events{/privacy}","received_events_url":"https://api.github.com/users/304NotModified/received_events","type":"User","site_admin":false},"created_at":"2015-08-01T17:25:05Z","updated_at":"2015-08-01T17:25:05Z","body":"PS: Of course it would be nice if `allowedClasses` is a `HashSet`  "}}