diff options
| author | Ondřej Surý <ondrej@sury.org> | 2012-05-02 15:44:51 +0200 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2012-05-02 15:44:51 +0200 |
| commit | 0003ee229fd33ff46cb5f2fe1e35f5c0284debc4 (patch) | |
| tree | 08c48264fd22152f443284397517a1b2be743c34 /src/pkg/net/http/server.go | |
| parent | 505c19580e0f43fe5224431459cacb7c21edd93d (diff) | |
| download | golang-0003ee229fd33ff46cb5f2fe1e35f5c0284debc4.tar.gz | |
Imported Upstream version 1.0.1upstream/1.0.1
Diffstat (limited to 'src/pkg/net/http/server.go')
| -rw-r--r-- | src/pkg/net/http/server.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pkg/net/http/server.go b/src/pkg/net/http/server.go index 228ac4019..924ffd348 100644 --- a/src/pkg/net/http/server.go +++ b/src/pkg/net/http/server.go @@ -785,8 +785,10 @@ var htmlReplacer = strings.NewReplacer( "&", "&", "<", "<", ">", ">", - `"`, """, - "'", "'", + // """ is shorter than """. + `"`, """, + // "'" is shorter than "'" and apos was not in HTML until HTML5. + "'", "'", ) func htmlEscape(s string) string { |
