diff options
author | Ondřej Surý <ondrej@sury.org> | 2011-09-19 10:12:52 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2011-09-19 10:12:52 +0200 |
commit | 9ad2a96babca1e646856b4335875b975f9bb7fa1 (patch) | |
tree | 4ac4867f2cfffd577fe5d9aa5fe4543bd2d96f45 /misc | |
parent | 5ff4c17907d5b19510a62e08fd8d3b11e62b431d (diff) | |
download | golang-9ad2a96babca1e646856b4335875b975f9bb7fa1.tar.gz |
Imported Upstream version 60.1upstream/60.1
Diffstat (limited to 'misc')
-rw-r--r-- | misc/goplay/goplay.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/goplay/goplay.go b/misc/goplay/goplay.go index bbc388ba4..a1eb61795 100644 --- a/misc/goplay/goplay.go +++ b/misc/goplay/goplay.go @@ -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> @@ -256,7 +256,7 @@ function compileUpdate() { </head> <body> <table width="100%"><tr><td width="60%" valign="top"> -<textarea autofocus="true" id="edit" spellcheck="false" onkeydown="keyHandler(event);" onkeyup="autocompile();">{{html .}}</textarea> +<textarea autofocus="true" id="edit" spellcheck="false" onkeydown="keyHandler(event);" onkeyup="autocompile();">{{printf "%s" . |html}}</textarea> <div class="hints"> (Shift-Enter to compile and run.) <input type="checkbox" id="autocompile" value="checked" /> Compile and run after each keystroke |