]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.r60] misc/goplay: another template fix
authorAndrew Gerrand <adg@golang.org>
Tue, 13 Sep 2011 04:45:37 +0000 (14:45 +1000)
committerAndrew Gerrand <adg@golang.org>
Tue, 13 Sep 2011 04:45:37 +0000 (14:45 +1000)
««« CL 4950063 / 775543b0795c
misc/goplay: another template fix

Fixes #2219.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4950063
»»»

R=dsymonds
CC=golang-dev
https://golang.org/cl/5000041

misc/goplay/goplay.go

index 7f4c45376f86713fe1b541f06b55f3d6c7b3b8f9..a1eb61795fe9e9469d2bb68a98c0ce49061ca087 100644 (file)
@@ -145,7 +145,7 @@ func run(cmd ...string) ([]byte, os.Error) {
 var frontPage = template.Must(template.New("frontPage").Parse(frontPageText)) // HTML template
 var output = template.Must(template.New("output").Parse(outputText))          // HTML template
 
-var outputText = `<pre>{{html .}}</pre>`
+var outputText = `<pre>{{printf "%s" . |html}}</pre>`
 
 var frontPageText = `<!doctype html>
 <html>