{"action":"created","issue":{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/872","labels_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/872/labels{/name}","comments_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/872/comments","events_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/872/events","html_url":"https://github.com/The-Compiler/qutebrowser/issues/872","id":100698653,"number":872,"title":"Validate HTML/CSS/...","user":{"login":"The-Compiler","id":625793,"avatar_url":"https://avatars.githubusercontent.com/u/625793?v=3","gravatar_id":"","url":"https://api.github.com/users/The-Compiler","html_url":"https://github.com/The-Compiler","followers_url":"https://api.github.com/users/The-Compiler/followers","following_url":"https://api.github.com/users/The-Compiler/following{/other_user}","gists_url":"https://api.github.com/users/The-Compiler/gists{/gist_id}","starred_url":"https://api.github.com/users/The-Compiler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/The-Compiler/subscriptions","organizations_url":"https://api.github.com/users/The-Compiler/orgs","repos_url":"https://api.github.com/users/The-Compiler/repos","events_url":"https://api.github.com/users/The-Compiler/events{/privacy}","received_events_url":"https://api.github.com/users/The-Compiler/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/labels/component:%20tests","name":"component: tests","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-13T06:23:08Z","updated_at":"2015-09-29T19:46:55Z","closed_at":null,"body":"The HTML/CSS/... shipped with qutebrowser should be validated by rendering it (either a minimal version via `utils.jinja` or by calling the real code) and then be validated.\r\n\r\nI can think of various methods to do so:\r\n\r\n- Using `lxml.etree`:\r\n\r\n```python\r\nparser = lxml.etree.HTMLParser(recover=False)\r\nlxml.etree.fromstring(html, parser)\r\n```\r\n\r\n- Using [PyTidyLib](http://countergram.com/open-source/pytidylib/docs/index.html)\r\n- Using [py_w3c](https://bitbucket.org/nmb10/py_w3c) to run the W3C validator (over the network...)\r\n- Using [cssutils](https://pypi.python.org/pypi/cssutils/) (for CSS)"},"comment":{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/comments/144168577","html_url":"https://github.com/The-Compiler/qutebrowser/issues/872#issuecomment-144168577","issue_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/872","id":144168577,"user":{"login":"The-Compiler","id":625793,"avatar_url":"https://avatars.githubusercontent.com/u/625793?v=3","gravatar_id":"","url":"https://api.github.com/users/The-Compiler","html_url":"https://github.com/The-Compiler","followers_url":"https://api.github.com/users/The-Compiler/followers","following_url":"https://api.github.com/users/The-Compiler/following{/other_user}","gists_url":"https://api.github.com/users/The-Compiler/gists{/gist_id}","starred_url":"https://api.github.com/users/The-Compiler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/The-Compiler/subscriptions","organizations_url":"https://api.github.com/users/The-Compiler/orgs","repos_url":"https://api.github.com/users/The-Compiler/repos","events_url":"https://api.github.com/users/The-Compiler/events{/privacy}","received_events_url":"https://api.github.com/users/The-Compiler/received_events","type":"User","site_admin":false},"created_at":"2015-09-29T19:46:55Z","updated_at":"2015-09-29T19:46:55Z","body":"It's mainly the stuff in `qutebrowser/javascript` and `qutebrowser/html` - though some of it needs to be rendered via jinja to (hopefully) be valid"}}