package raymond import "fmt" func ExampleEscape() { tpl := MustParse("{{link url text}}") tpl.RegisterHelper("link", func(url string, text string) SafeString { return SafeString("" + Escape(text) + "") }) ctx := map[string]string{ "url": "http://www.aymerick.com/", "text": "This is a cool website", } result := tpl.MustExec(ctx) fmt.Print(result) // Output: This is a <em>cool</em> website }