Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(9603)

Issue 96060044: code review 96060044: html: handle '<' before a tag

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 11 months ago by andybalholm
Modified:
9 years, 11 months ago
Reviewers:
nigeltao
CC:
golang-codereviews, gobot, nigeltao
Visibility:
Public.

Description

html: handle '<' before a tag As pointed out at https://groups.google.com/forum/#!topic/golang-nuts/LJozHIXAAJY, `<<p>html</p>` was parsed as `&lt;&lt;p&gt;html</p>`. There was no test case for this. Chrome parses it as `&lt<p>html</p>`, and that seems to be correct. We were missing the "Reconcume the current input character" step at http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#tag-open-state

Patch Set 1 #

Patch Set 2 : diff -r 53130366067a https://code.google.com/p/go.net #

Patch Set 3 : diff -r 53130366067a https://code.google.com/p/go.net #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -0 lines) Patch
M html/token.go View 1 1 chunk +2 lines, -0 lines 0 comments Download
M html/token_test.go View 1 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 4
andybalholm
Hello golang-codereviews@googlegroups.com (cc: nigeltao@golang.org), I'd like you to review this change to https://code.google.com/p/go.net
9 years, 11 months ago (2014-05-07 21:38:06 UTC) #1
gobot
R=nigeltao@golang.org (assigned by r@golang.org)
9 years, 11 months ago (2014-05-08 14:05:02 UTC) #2
nigeltao
LGTM.
9 years, 11 months ago (2014-05-12 06:39:36 UTC) #3
nigeltao
9 years, 11 months ago (2014-05-12 06:42:35 UTC) #4
*** Submitted as
https://code.google.com/p/go/source/detail?r=f3fd9e904a78&repo=net ***

html: handle '<' before a tag

As pointed out at
https://groups.google.com/forum/#!topic/golang-nuts/LJozHIXAAJY,
`<<p>html</p>` was parsed as `&lt;&lt;p&gt;html</p>`.
There was no test case for this. Chrome parses it as `&lt<p>html</p>`,
and that seems to be correct. We were missing the
"Reconcume the current input character" step at
http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html...

LGTM=nigeltao
R=golang-codereviews, gobot, nigeltao
CC=golang-codereviews, nigeltao
https://codereview.appspot.com/96060044

Committer: Nigel Tao <nigeltao@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b