Source File
urlset.go
Belonging Package
github.com/google/safehtml
package safehtml
import (
)
var asciiWhitespace [256]bool
var srcsetMetachars [256]bool
func () {
asciiWhitespace['\t'] = true
asciiWhitespace[' '] = true
asciiWhitespace['\n'] = true
asciiWhitespace['\f'] = true
asciiWhitespace['\r'] = true
srcsetMetachars['\t'] = true
srcsetMetachars[' '] = true
srcsetMetachars['\n'] = true
srcsetMetachars['\f'] = true
srcsetMetachars['\r'] = true
srcsetMetachars[','] = true
}
var , string
_, = consumeIn(, asciiWhitespace)
, = consumeNotIn(, asciiWhitespace)
_, = consumeIn(, asciiWhitespace)
, = consumeNotIn(, srcsetMetachars)
_, = consumeIn(, asciiWhitespace)
if len() != 0 && isSafeURL() && isOptionalSrcMetadataWellFormed() {
.WriteString(" , ")
appendURLToSet(, &)
if len() != 0 {
.WriteByte(' ')
.WriteString()
}
}
func ( string, *bytes.Buffer) {
:= len()
, := 0,
if [] == ',' {
.WriteString("%2c")
++
}
:= false
if < && [-1] == ',' {
= true
--
}
.WriteString([:])
if {
.WriteString("%2c")
}
}
:= len()
return true
}
:=
if := [-1] | 32; 'a' <= && <= 'z' {
= [0 : -1]
, := strconv.ParseFloat(, 64)
return == nil
}
![]() |
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. |