{"action":"created","issue":{"url":"https://api.github.com/repos/FlorianRappl/AngleSharp/issues/113","labels_url":"https://api.github.com/repos/FlorianRappl/AngleSharp/issues/113/labels{/name}","comments_url":"https://api.github.com/repos/FlorianRappl/AngleSharp/issues/113/comments","events_url":"https://api.github.com/repos/FlorianRappl/AngleSharp/issues/113/events","html_url":"https://github.com/FlorianRappl/AngleSharp/issues/113","id":95688563,"number":113,"title":"CSS property not removed by RemoveProperty","user":{"login":"mganss","id":976344,"avatar_url":"https://avatars.githubusercontent.com/u/976344?v=3","gravatar_id":"","url":"https://api.github.com/users/mganss","html_url":"https://github.com/mganss","followers_url":"https://api.github.com/users/mganss/followers","following_url":"https://api.github.com/users/mganss/following{/other_user}","gists_url":"https://api.github.com/users/mganss/gists{/gist_id}","starred_url":"https://api.github.com/users/mganss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mganss/subscriptions","organizations_url":"https://api.github.com/users/mganss/orgs","repos_url":"https://api.github.com/users/mganss/repos","events_url":"https://api.github.com/users/mganss/events{/privacy}","received_events_url":"https://api.github.com/users/mganss/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/FlorianRappl/AngleSharp/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/FlorianRappl/AngleSharp/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":{"login":"FlorianRappl","id":1766191,"avatar_url":"https://avatars.githubusercontent.com/u/1766191?v=3","gravatar_id":"","url":"https://api.github.com/users/FlorianRappl","html_url":"https://github.com/FlorianRappl","followers_url":"https://api.github.com/users/FlorianRappl/followers","following_url":"https://api.github.com/users/FlorianRappl/following{/other_user}","gists_url":"https://api.github.com/users/FlorianRappl/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorianRappl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorianRappl/subscriptions","organizations_url":"https://api.github.com/users/FlorianRappl/orgs","repos_url":"https://api.github.com/users/FlorianRappl/repos","events_url":"https://api.github.com/users/FlorianRappl/events{/privacy}","received_events_url":"https://api.github.com/users/FlorianRappl/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/FlorianRappl/AngleSharp/milestones/4","html_url":"https://github.com/FlorianRappl/AngleSharp/milestones/v0.9","labels_url":"https://api.github.com/repos/FlorianRappl/AngleSharp/milestones/4/labels","id":921049,"number":4,"title":"v0.9","description":"","creator":{"login":"FlorianRappl","id":1766191,"avatar_url":"https://avatars.githubusercontent.com/u/1766191?v=3","gravatar_id":"","url":"https://api.github.com/users/FlorianRappl","html_url":"https://github.com/FlorianRappl","followers_url":"https://api.github.com/users/FlorianRappl/followers","following_url":"https://api.github.com/users/FlorianRappl/following{/other_user}","gists_url":"https://api.github.com/users/FlorianRappl/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorianRappl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorianRappl/subscriptions","organizations_url":"https://api.github.com/users/FlorianRappl/orgs","repos_url":"https://api.github.com/users/FlorianRappl/repos","events_url":"https://api.github.com/users/FlorianRappl/events{/privacy}","received_events_url":"https://api.github.com/users/FlorianRappl/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":19,"state":"open","created_at":"2015-01-04T15:40:59Z","updated_at":"2015-07-17T18:52:06Z","due_on":"2015-07-22T04:00:00Z","closed_at":null},"comments":2,"created_at":"2015-07-17T16:06:43Z","updated_at":"2015-07-17T19:02:54Z","closed_at":"2015-07-17T18:52:06Z","body":"`RemoveProperty` does not in fact remove the property in some cases:\r\n\r\n```C#\r\nvar html = @\"<DIV STYLE='background: url(\"\"javascript:alert(foo)\"\")'>\";\r\nvar parser = new HtmlParser(new Configuration().WithCss(e => e.Options = new CssParserOptions\r\n{\r\n    IsIncludingUnknownDeclarations = true,\r\n    IsIncludingUnknownRules = true,\r\n    IsToleratingInvalidConstraints = true,\r\n    IsToleratingInvalidValues = true\r\n}));\r\nvar dom = parser.Parse(html);\r\nvar div = (IHtmlElement)dom.QuerySelector(\"div\");\r\nvar bg = div.Style.First(p => p.Name == \"background\");\r\ndiv.Style.RemoveProperty(bg.Name);\r\nvar removed = !div.Style.Any(p => p.Name == \"background\"); // false\r\nvar s = div.ToHtml(); // <div style=\"background: url(&quot;javascript:alert(foo)&quot;);\"></div>\r\n```"},"comment":{"url":"https://api.github.com/repos/FlorianRappl/AngleSharp/issues/comments/122374210","html_url":"https://github.com/FlorianRappl/AngleSharp/issues/113#issuecomment-122374210","issue_url":"https://api.github.com/repos/FlorianRappl/AngleSharp/issues/113","id":122374210,"user":{"login":"FlorianRappl","id":1766191,"avatar_url":"https://avatars.githubusercontent.com/u/1766191?v=3","gravatar_id":"","url":"https://api.github.com/users/FlorianRappl","html_url":"https://github.com/FlorianRappl","followers_url":"https://api.github.com/users/FlorianRappl/followers","following_url":"https://api.github.com/users/FlorianRappl/following{/other_user}","gists_url":"https://api.github.com/users/FlorianRappl/gists{/gist_id}","starred_url":"https://api.github.com/users/FlorianRappl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FlorianRappl/subscriptions","organizations_url":"https://api.github.com/users/FlorianRappl/orgs","repos_url":"https://api.github.com/users/FlorianRappl/repos","events_url":"https://api.github.com/users/FlorianRappl/events{/privacy}","received_events_url":"https://api.github.com/users/FlorianRappl/received_events","type":"User","site_admin":false},"created_at":"2015-07-17T19:02:54Z","updated_at":"2015-07-17T19:02:54Z","body":"I adjusted the behavior of the `CssStyleDeclaration`. It distinguishes now between these two cases. Most algorithms that differentiated between shorthand and longhand now start with the (mostly trivial) longhand check. The shorthand is used only if unknown declarations are forbidden. Otherwise it is known that any name is allowed and nothing specific will be instantiated."}}