From c92b1bc7f829182c2a5276ebd4567f54f6cc713d Mon Sep 17 00:00:00 2001 From: ian Date: Fri, 4 May 2012 15:01:11 +0000 Subject: libgo: Update to Go 1.0.1 release. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187163 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgo/go/html/escape.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libgo/go/html/escape.go') diff --git a/libgo/go/html/escape.go b/libgo/go/html/escape.go index fee771a5784..24cb7af8524 100644 --- a/libgo/go/html/escape.go +++ b/libgo/go/html/escape.go @@ -210,13 +210,15 @@ func escape(w writer, s string) error { case '&': esc = "&" case '\'': - esc = "'" + // "'" is shorter than "'" and apos was not in HTML until HTML5. + esc = "'" case '<': esc = "<" case '>': esc = ">" case '"': - esc = """ + // """ is shorter than """. + esc = """ default: panic("unrecognized escape character") } @@ -231,7 +233,7 @@ func escape(w writer, s string) error { } // EscapeString escapes special characters like "<" to become "<". It -// escapes only five such characters: amp, apos, lt, gt and quot. +// escapes only five such characters: <, >, &, ' and ". // UnescapeString(EscapeString(s)) == s always holds, but the converse isn't // always true. func EscapeString(s string) string { -- cgit v1.2.1