go: cuelang.org/go/pkg/html Index | Files

package html

import "cuelang.org/go/pkg/html"

Index

Package Files

html.go

func Escape Uses

func Escape(s string) string

Escape escapes special characters like "<" to become "&lt;". It escapes only five such characters: <, >, &, ' and ". UnescapeString(Escape(s)) == s always holds, but the converse isn't always true.

func Unescape Uses

func Unescape(s string) string

Unescape unescapes entities like "&lt;" to become "<". It unescapes a larger range of entities than EscapeString escapes. For example, "&aacute;" unescapes to "á", as does "&#225;" and "&#xE1;". Unescape(EscapeString(s)) == s always holds, but the converse isn't always true.

Package html imports 1 packages (graph). Updated 2019-12-07. Refresh now. Tools for package owners.