"strings"
)
-// TODO: ensure transition error messages contain template name and ideally
-// line info.
-
// transitionFunc is the array of context transition functions for text nodes.
// A transition function takes a context and template text input, and returns
// the updated context and the number of bytes consumed from the front of the
if i >= 0 && strings.IndexRune(s[:i], '/') < 0 {
protocol := strings.ToLower(s[:i])
if protocol != "http" && protocol != "https" && protocol != "mailto" {
- // Return a value that someone investigating a bug
- // report can put into a search engine.
return "#" + filterFailsafe
}
}
- // TODO: Once we handle <style>#id { background: url({{.Img}}) }</style>
- // we will need to stop this from HTML escaping and pipeline sanitizers.
return s
}