1// Copyright 2015 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5package html_test
6
7import (
8	"fmt"
9	"html"
10)
11
12func ExampleEscapeString() {
13	const s = `"Fran & Freddie's Diner" <tasty@example.com>`
14	fmt.Println(html.EscapeString(s))
15	// Output: &#34;Fran &amp; Freddie&#39;s Diner&#34; &lt;[email protected]&gt;
16}
17
18func ExampleUnescapeString() {
19	const s = `&quot;Fran &amp; Freddie&#39;s Diner&quot; &lt;tasty@example.com&gt;`
20	fmt.Println(html.UnescapeString(s))
21	// Output: "Fran & Freddie's Diner" <[email protected]>
22}
23