summaryrefslogtreecommitdiff
path: root/libgo/go/html/escape.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/html/escape.go')
-rw-r--r--libgo/go/html/escape.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/libgo/go/html/escape.go b/libgo/go/html/escape.go
index e9edc474da5..69e0028e445 100644
--- a/libgo/go/html/escape.go
+++ b/libgo/go/html/escape.go
@@ -14,7 +14,7 @@ import (
// These replacements permit compatibility with old numeric entities that
// assumed Windows-1252 encoding.
// http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#consume-a-character-reference
-var replacementTable = [...]int{
+var replacementTable = [...]rune{
'\u20AC', // First entry is what 0x80 should be replaced with.
'\u0081',
'\u201A',
@@ -79,23 +79,23 @@ func unescapeEntity(b []byte, dst, src int, attribute bool) (dst1, src1 int) {
i++
}
- x := 0
+ x := rune(0)
for i < len(s) {
c = s[i]
i++
if hex {
if '0' <= c && c <= '9' {
- x = 16*x + int(c) - '0'
+ x = 16*x + rune(c) - '0'
continue
} else if 'a' <= c && c <= 'f' {
- x = 16*x + int(c) - 'a' + 10
+ x = 16*x + rune(c) - 'a' + 10
continue
} else if 'A' <= c && c <= 'F' {
- x = 16*x + int(c) - 'A' + 10
+ x = 16*x + rune(c) - 'A' + 10
continue
}
} else if '0' <= c && c <= '9' {
- x = 10*x + int(c) - '0'
+ x = 10*x + rune(c) - '0'
continue
}
if c != ';' {