summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2011-08-12 16:28:55 -0700
committerRobert Griesemer <gri@golang.org>2011-08-12 16:28:55 -0700
commite3e3dfd8648c1e3625bd3040f587aed5b951f9e7 (patch)
treef558051731bed499b19c13cd8b8db598dbb817a4 /lib
parent1b8c4c200cbecaee383744d9d25b6bf78191fb9b (diff)
downloadgo-e3e3dfd8648c1e3625bd3040f587aed5b951f9e7.tar.gz
godoc: position URLs (containing file names) must be quoted and URL escaped
Since the posLink_url also adds a non-URL attribute, the quoting and URL-escaping must happen inside posLink_url (otherwise the non-URL attribute becomes part or the URL portion of the tag. R=r CC=golang-dev http://codereview.appspot.com/4888041
Diffstat (limited to 'lib')
-rw-r--r--lib/godoc/package.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/godoc/package.html b/lib/godoc/package.html
index 968f69a7c..265e5d53b 100644
--- a/lib/godoc/package.html
+++ b/lib/godoc/package.html
@@ -42,7 +42,7 @@
{{range .}}
{{/* Name is a string - no need for FSet */}}
{{$name := html .Name}}
- <h2 id="{{$name}}">func <a href="/{{posLink .Decl $.FSet}}">{{$name}}</a></h2>
+ <h2 id="{{$name}}">func <a href="/{{posLink_url .Decl $.FSet}}">{{$name}}</a></h2>
<p><code>{{node_html .Decl $.FSet}}</code></p>
{{comment_html .Doc}}
{{end}}
@@ -50,7 +50,7 @@
{{with .Types}}
{{range .}}
{{$tname := node_html .Type.Name $.FSet}}
- <h2 id="{{$tname}}">type <a href="/{{posLink .Decl $.FSet}}">{{$tname}}</a></h2>
+ <h2 id="{{$tname}}">type <a href="/{{posLink_url .Decl $.FSet}}">{{$tname}}</a></h2>
{{comment_html .Doc}}
<p><pre>{{node_html .Decl $.FSet}}</pre></p>
{{range .Consts}}
@@ -63,13 +63,13 @@
{{end}}
{{range .Factories}}
{{$name := html .Name}}
- <h3 id="{{$tname}}.{{$name}}">func <a href="/{{posLink .Decl $.FSet}}">{{$name}}</a></h3>
+ <h3 id="{{$tname}}.{{$name}}">func <a href="/{{posLink_url .Decl $.FSet}}">{{$name}}</a></h3>
<p><code>{{node_html .Decl $.FSet}}</code></p>
{{comment_html .Doc}}
{{end}}
{{range .Methods}}
{{$name := html .Name}}
- <h3 id="{{$tname}}.{{$name}}">func ({{node_html .Recv $.FSet}}) <a href="/{{posLink .Decl $.FSet}}">{{$name}}</a></h3>
+ <h3 id="{{$tname}}.{{$name}}">func ({{node_html .Recv $.FSet}}) <a href="/{{posLink_url .Decl $.FSet}}">{{$name}}</a></h3>
<p><code>{{node_html .Decl $.FSet}}</code></p>
{{comment_html .Doc}}
{{end}}