{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"closed","user":{"avatar_url":"https://secure.gravatar.com/avatar/89ebd04ce236b03ba2eaa0b582f6f277?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"89ebd04ce236b03ba2eaa0b582f6f277","url":"https://api.github.com/users/O-Zone","login":"O-Zone","id":574438},"milestone":{"state":"open","open_issues":7,"url":"https://api.github.com/repos/aredridel/html5/milestones/3","due_on":null,"title":"First: Be completely correct","description":"","creator":{"avatar_url":"https://secure.gravatar.com/avatar/fcd0e4a77335a364f15014590c612352?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"fcd0e4a77335a364f15014590c612352","url":"https://api.github.com/users/aredridel","login":"aredridel","id":2876},"number":3,"closed_issues":3,"created_at":"2011-04-11T01:52:32Z"},"assignee":{"avatar_url":"https://secure.gravatar.com/avatar/fcd0e4a77335a364f15014590c612352?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"fcd0e4a77335a364f15014590c612352","url":"https://api.github.com/users/aredridel","login":"aredridel","id":2876},"updated_at":"2011-11-14T02:42:10Z","labels":[{"name":"Script handling","color":"d7e102","url":"https://api.github.com/repos/aredridel/html5/labels/Script+handling"}],"comments":8,"closed_at":"2011-11-14T02:42:10Z","url":"https://api.github.com/repos/aredridel/html5/issues/17","body":"I'm using the Tokenizer to chop up html snippets, and it is working like a dream. Unfortunately it has this one odd idea of splitting up a script block, if it contains tags - even though they are inside litterals. I don't know if this is by design or by accident, but I would expect it to handle the whole script block as one Character token.\r\n\r\nHere is an example of the problem:\r\n\r\n    <body>\r\n      <script>\r\n        var x = \"<a href='myPage.htm'>myLink<\\/a>\"\r\n      </script>\r\n    </body>\r\n\r\nWhen tokenized, this snippet will result in something in the (simplified) neighbourhood of:\r\n\r\n1. StartTag: body\r\n2. StartTag: script\r\n3. Characters: 'var x = \"'\r\n4. StartTag: a\r\n5. Characters: 'myLink<\\/a>'\r\n6. EndTag: script\r\n7. EndTag: body\r\n\r\nI would have expected 3-5 to be all in one Character node. The end a-tag also results in a ParseError, since it is escaped and thus does not get recognized. So my code ends up deeming this snippet for malformed, lacking the end a-tag.\r\n\r\nIs this a bug, or is it by design, because it should be handled elsewhere (the Parser?). I'm not using the parser because of speed and a desire to keep everything streaming nicely not having to wait for the whole tree to be build and managed.\r\n\r\nMy guess is that this thing would count for poorly named selectors in a style tag too, but I haven't tried that out yet.","html_url":"https://github.com/aredridel/html5/issues/17","title":"Tokenizer splits a script block, if it contains tags even if it is inside litterals.","number":17,"id":539092,"created_at":"2011-01-20T13:38:23Z"},"action":"closed"}