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.
14 func ExampleEscapeString() {
15 const s
= `"Fran & Freddie's Diner" <tasty@example.com>`
16 fmt
.Println(html
.EscapeString(s
))
17 // Output: "Fran & Freddie's Diner" <tasty@example.com>
20 func ExampleUnescapeString() {
21 const s
= `"Fran & Freddie's Diner" <tasty@example.com>`
22 fmt
.Println(html
.UnescapeString(s
))
23 // Output: "Fran & Freddie's Diner" <tasty@example.com>