{"action":"created","issue":{"url":"https://api.github.com/repos/cgrand/enlive/issues/123","labels_url":"https://api.github.com/repos/cgrand/enlive/issues/123/labels{/name}","comments_url":"https://api.github.com/repos/cgrand/enlive/issues/123/comments","events_url":"https://api.github.com/repos/cgrand/enlive/issues/123/events","html_url":"https://github.com/cgrand/enlive/issues/123","id":56688523,"number":123,"title":"Enlive does not properly parse HTML5 docs with <meta> tags in the <body>","user":{"login":"armhold","id":528692,"avatar_url":"https://avatars.githubusercontent.com/u/528692?v=3","gravatar_id":"","url":"https://api.github.com/users/armhold","html_url":"https://github.com/armhold","followers_url":"https://api.github.com/users/armhold/followers","following_url":"https://api.github.com/users/armhold/following{/other_user}","gists_url":"https://api.github.com/users/armhold/gists{/gist_id}","starred_url":"https://api.github.com/users/armhold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/armhold/subscriptions","organizations_url":"https://api.github.com/users/armhold/orgs","repos_url":"https://api.github.com/users/armhold/repos","events_url":"https://api.github.com/users/armhold/events{/privacy}","received_events_url":"https://api.github.com/users/armhold/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-05T15:57:55Z","updated_at":"2015-02-06T13:40:51Z","closed_at":null,"body":"Enlive does not properly parse HTML5 docs with `<meta>` tags in the `<body>`. This test fails, but will pass if you remove the `<meta>` tag:\r\n\r\n```\r\n(deftest test-enlive\r\n  (testing \"enlive\"\r\n    (let [html-as-string \"<!DOCTYPE html><html lang=\\\"en\\\"><body><div><meta name=\\\"bar\\\"><span>the content</span></body></html>\"\r\n          parsed-html (enlive/html-resource (java.io.StringReader. html-as-string))\r\n          span (enlive/select parsed-html [ :div  :span ])\r\n          content (first (map enlive/text span))]\r\n      (is (= \"the content\" content)))))\r\n```\r\n\r\nIt also happens when I use the JSoup parser.\r\n\r\nStackoverflow issue: http://stackoverflow.com/questions/28335525/parsing-html5-with-enlive-tagsoup-jsoup\r\n\r\nOld discussion on the mailing list: https://groups.google.com/forum/#!msg/enlive-clj/zjKsnL48Z6s/xoRJ_7PXwxYJ.\r\n"},"comment":{"url":"https://api.github.com/repos/cgrand/enlive/issues/comments/73237403","html_url":"https://github.com/cgrand/enlive/issues/123#issuecomment-73237403","issue_url":"https://api.github.com/repos/cgrand/enlive/issues/123","id":73237403,"user":{"login":"armhold","id":528692,"avatar_url":"https://avatars.githubusercontent.com/u/528692?v=3","gravatar_id":"","url":"https://api.github.com/users/armhold","html_url":"https://github.com/armhold","followers_url":"https://api.github.com/users/armhold/followers","following_url":"https://api.github.com/users/armhold/following{/other_user}","gists_url":"https://api.github.com/users/armhold/gists{/gist_id}","starred_url":"https://api.github.com/users/armhold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/armhold/subscriptions","organizations_url":"https://api.github.com/users/armhold/orgs","repos_url":"https://api.github.com/users/armhold/repos","events_url":"https://api.github.com/users/armhold/events{/privacy}","received_events_url":"https://api.github.com/users/armhold/received_events","type":"User","site_admin":false},"created_at":"2015-02-06T13:40:51Z","updated_at":"2015-02-06T13:40:51Z","body":"Thanks. The following works:\r\n\r\n```\r\n(deftest test-enlive\r\n  (testing \"enlive\"\r\n    (enlive/set-ns-parser! cgrand-jsoup/parser)\r\n    (let [html-as-string \"<!DOCTYPE html><html lang=\\\"en\\\"><body><div><meta name=\\\"bar\\\"><span>the content</span></body></html>\"\r\n          string-bytes (.getBytes html-as-string \"UTF-8\")\r\n          bais (java.io.ByteArrayInputStream. string-bytes)\r\n          parsed-html (enlive/html-resource bais (enlive/ns-options))\r\n          span (enlive/select parsed-html [ :div  :span ])\r\n          content (first (map enlive/text span))]\r\n      (is (= \"the content\" content)))))\r\n```"}}