ghtml

package
v1.15.2-0...-1a0745b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package ghtml provides useful API for HTML content handling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Entities

func Entities(s string) string

Entities encodes all HTML chars for content. Referer: http://php.net/manual/zh/function.htmlentities.php

func EntitiesDecode

func EntitiesDecode(s string) string

EntitiesDecode decodes all HTML chars for content. Referer: http://php.net/manual/zh/function.html-entity-decode.php

func SpecialChars

func SpecialChars(s string) string

SpecialChars encodes some special chars for content, these special chars are: "&", "<", ">", `"`, "'". Referer: http://php.net/manual/zh/function.htmlspecialchars.php

func SpecialCharsDecode

func SpecialCharsDecode(s string) string

SpecialCharsDecode decodes some special chars for content, these special chars are: "&", "<", ">", `"`, "'". Referer: http://php.net/manual/zh/function.htmlspecialchars-decode.php

func SpecialCharsMapOrStruct

func SpecialCharsMapOrStruct(mapOrStruct interface{}) error

SpecialCharsMapOrStruct automatically encodes string values/attributes for map/struct.

func StripTags

func StripTags(s string) string

StripTags strips HTML tags from content, and returns only text. Referer: http://php.net/manual/zh/function.strip-tags.php

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL