|
- {{html $src}}:
+ {{$src}}:
|
|
{{len .Lines}} |
|
{{range .Lines}}
- {{html .}}
+ {{html .}}
{{end}}
{{if not $.Complete}}
...
diff --git a/src/cmd/godoc/godoc.go b/src/cmd/godoc/godoc.go
index 98fdc19d04..e3f8ad8d36 100644
--- a/src/cmd/godoc/godoc.go
+++ b/src/cmd/godoc/godoc.go
@@ -481,7 +481,7 @@ func posLink_urlFunc(node ast.Node, fset *token.FileSet) string {
}
var buf bytes.Buffer
- buf.WriteString(http.URLEscape(relpath))
+ template.HTMLEscape(&buf, []byte(relpath))
// selection ranges are of form "s=low:high"
if low < high {
fmt.Fprintf(&buf, "?s=%d:%d", low, high) // no need for URL escaping
|