Documentation ¶
Overview ¶
Package ghtml 提供了用于处理 HTML 内容的有用 API。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func X删除HTML标记 ¶
StripTags 从内容中剥离 HTML 标签,仅返回文本内容。 参考来源:http://php.net/manual/zh/function.strip-tags.php
func X编码 ¶
Entities 将内容中的所有HTML字符进行编码。 参考来源: http://php.net/manual/zh/function.htmlentities.php
func X编码Map ¶
func X编码Map(map或Struct interface{}) error
SpecialCharsMapOrStruct 自动对 map 或 struct 中的字符串值/属性进行编码。
func X编码特殊字符 ¶
SpecialChars 为内容编码一些特殊字符,这些特殊字符包括: "&", "<", ">", `"`, "'". 参考:http://php.net/manual/zh/function.htmlspecialchars.php
func X解码 ¶
EntitiesDecode 将内容中的所有HTML字符进行解码。 参考:http://php.net/manual/zh/function.html-entity-decode.php
func X解码特殊字符 ¶
SpecialCharsDecode 对内容中的某些特殊字符进行解码,这些特殊字符包括: "&"(和号)、"<"(小于号)、">"(大于号)、`"`(双引号)、"'"(单引号)。 参考文档:http://php.net/manual/zh/function.htmlspecialchars-decode.php
Types ¶
This section is empty.