Source File
html.go
Belonging Package
html/template
package template
import (
)
func ( ...interface{}) string {
, := stringify(...)
if == contentTypeHTML {
return htmlReplacer(stripTags(), htmlNospaceNormReplacementTable, false)
}
return htmlReplacer(, htmlNospaceReplacementTable, false)
}
func ( ...interface{}) string {
, := stringify(...)
if == contentTypeHTML {
return htmlReplacer(stripTags(), htmlNormReplacementTable, true)
}
return htmlReplacer(, htmlReplacementTable, true)
}
func ( ...interface{}) string {
, := stringify(...)
if == contentTypeHTML {
return htmlReplacer(, htmlNormReplacementTable, true)
}
return htmlReplacer(, htmlReplacementTable, true)
}
func ( ...interface{}) string {
, := stringify(...)
if == contentTypeHTML {
return
}
return htmlReplacer(, htmlReplacementTable, true)
}
0: "\uFFFD",
'"': """,
'&': "&",
'\'': "'",
'+': "+",
'<': "<",
'>': ">",
}
var htmlNormReplacementTable = []string{
0: "\uFFFD",
'"': """,
'\'': "'",
'+': "+",
'<': "<",
'>': ">",
}
var htmlNospaceReplacementTable = []string{
0: "�",
'\t': "	",
'\n': " ",
'\v': "",
'\f': "",
'\r': " ",
' ': " ",
'"': """,
'&': "&",
'\'': "'",
'+': "+",
'<': "<",
'=': "=",
'`': "`",
}
var htmlNospaceNormReplacementTable = []string{
0: "�",
'\t': "	",
'\n': " ",
'\v': "",
'\f': "",
'\r': " ",
' ': " ",
'"': """,
'\'': "'",
'+': "+",
'<': "<",
'=': "=",
'`': "`",
}
, = utf8.DecodeRuneInString([:])
if int() < len() {
if := []; len() != 0 {
if == 0 {
.Grow(len())
}
.WriteString([:])
.WriteString()
= +
}
if .element != elementNone && !isInTag() {
= stateRCDATA
}
, := transitionFunc[](, [:])
:= +
func ( ...interface{}) string {
, := stringify(...)
if == contentTypeHTMLAttr {
return
}
return filterFailsafe
}
= strings.ToLower()
return filterFailsafe
}
for , := range {
switch {
case '0' <= && <= '9':
case 'a' <= && <= 'z':
default:
return filterFailsafe
}
}
return
}
func ( ...interface{}) string {
return ""
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |