Commit b3d8e6d7 authored by Mike Samuel's avatar Mike Samuel

exp/template/html: remove TODO comments that have been done or mooted

R=nigeltao
CC=golang-dev
https://golang.org/cl/5128041
parent ecda69e6
...@@ -9,9 +9,6 @@ import ( ...@@ -9,9 +9,6 @@ import (
"strings" "strings"
) )
// TODO: ensure transition error messages contain template name and ideally
// line info.
// transitionFunc is the array of context transition functions for text nodes. // transitionFunc is the array of context transition functions for text nodes.
// A transition function takes a context and template text input, and returns // 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 // the updated context and the number of bytes consumed from the front of the
......
...@@ -21,13 +21,9 @@ func urlFilter(args ...interface{}) string { ...@@ -21,13 +21,9 @@ func urlFilter(args ...interface{}) string {
if i >= 0 && strings.IndexRune(s[:i], '/') < 0 { if i >= 0 && strings.IndexRune(s[:i], '/') < 0 {
protocol := strings.ToLower(s[:i]) protocol := strings.ToLower(s[:i])
if protocol != "http" && protocol != "https" && protocol != "mailto" { if protocol != "http" && protocol != "https" && protocol != "mailto" {
// Return a value that someone investigating a bug
// report can put into a search engine.
return "#" + filterFailsafe 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 return s
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment