From cf8cb4f8f54090897d2227e3dea0ab713cc7ec61 Mon Sep 17 00:00:00 2001 From: Andrew Balholm Date: Thu, 21 Jul 2011 09:10:49 +1000 Subject: html: handle character entities without semicolons Fix the TODO: unescape("¬it;") should be "?it;" Also accept digits in entity names. R=nigeltao CC=golang-dev, rsc http://codereview.appspot.com/4781042 Committer: Nigel Tao --- src/pkg/html/token_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/pkg/html/token_test.go') diff --git a/src/pkg/html/token_test.go b/src/pkg/html/token_test.go index c794612ab..c8dcc8864 100644 --- a/src/pkg/html/token_test.go +++ b/src/pkg/html/token_test.go @@ -107,6 +107,16 @@ var tokenTests = []tokenTest{ `<&alsoDoesntExist;&`, `$<&alsoDoesntExist;&`, }, + { + "entity without semicolon", + `¬it;∉`, + `¬it;∉$`, + }, + { + "entity with digits", + "½", + "½", + }, // Attribute tests: // http://dev.w3.org/html5/spec/Overview.html#attributes-0 -- cgit v1.2.1