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

Issue 4781042: code review 4781042: html: handle character entities without semicolons (Closed)

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

Description

html: handle character entities without semicolons Fix the TODO: unescape("&notit;") should be "¬it;" Also accept digits in entity names.

Patch Set 1 #

Patch Set 2 : diff -r e5d2a3b18f7c https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r e5d2a3b18f7c https://go.googlecode.com/hg/ #

Total comments: 3

Patch Set 4 : diff -r 2e7ece227c7d https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r 2e7ece227c7d https://go.googlecode.com/hg/ #

Total comments: 3

Patch Set 6 : diff -r 2e7ece227c7d https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -8 lines) Patch
M src/pkg/html/entity.go View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M src/pkg/html/entity_test.go View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M src/pkg/html/escape.go View 1 2 3 4 5 4 chunks +22 lines, -7 lines 0 comments Download
M src/pkg/html/token.go View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/html/token_test.go View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download

Messages

Total messages: 9
andybalholm
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com, nigeltao@golang.org, rsc@golang.org), I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 9 months ago (2011-07-19 15:07:06 UTC) #1
nigeltao
http://codereview.appspot.com/4781042/diff/4001/src/pkg/html/escape.go File src/pkg/html/escape.go (right): http://codereview.appspot.com/4781042/diff/4001/src/pkg/html/escape.go#newcode139 src/pkg/html/escape.go:139: if entityName == "" { Replace the if-else-if chain ...
12 years, 9 months ago (2011-07-20 03:28:57 UTC) #2
andybalholm
Hello golang-dev@googlegroups.com, nigeltao@golang.org (cc: golang-dev@googlegroups.com, rsc@golang.org), Please take another look.
12 years, 9 months ago (2011-07-20 14:36:01 UTC) #3
andybalholm
Hello golang-dev@googlegroups.com, nigeltao@golang.org (cc: golang-dev@googlegroups.com, rsc@golang.org), Please take another look.
12 years, 9 months ago (2011-07-20 14:36:21 UTC) #4
nigeltao
http://codereview.appspot.com/4781042/diff/12001/src/pkg/html/entity.go File src/pkg/html/entity.go (right): http://codereview.appspot.com/4781042/diff/12001/src/pkg/html/entity.go#newcode7 src/pkg/html/entity.go:7: const longestEntityWithoutSemicolon = 6 Add a comment: // All ...
12 years, 9 months ago (2011-07-20 22:47:25 UTC) #5
nigeltao
http://codereview.appspot.com/4781042/diff/12001/src/pkg/html/escape.go File src/pkg/html/escape.go (right): http://codereview.appspot.com/4781042/diff/12001/src/pkg/html/escape.go#newcode146 src/pkg/html/escape.go:146: x := entity[entityName] Ugh, I didn't realize that you'd ...
12 years, 9 months ago (2011-07-20 23:00:06 UTC) #6
andybalholm
Hello nigeltao@golang.org (cc: golang-dev@googlegroups.com, rsc@golang.org), Please take another look.
12 years, 9 months ago (2011-07-20 23:04:50 UTC) #7
nigeltao
LGTM, thanks. And by "LGTM", I mean the code, not HTML5. Ugh!
12 years, 9 months ago (2011-07-20 23:08:46 UTC) #8
nigeltao
12 years, 9 months ago (2011-07-20 23:11:21 UTC) #9
*** Submitted as http://code.google.com/p/go/source/detail?r=ba2e1d04d77b ***

html: handle character entities without semicolons

Fix the TODO: unescape("&notit;") should be "¬it;"

Also accept digits in entity names.

R=nigeltao
CC=golang-dev, rsc
http://codereview.appspot.com/4781042

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