summaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/net/html
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/net/html')
-rw-r--r--vendor/golang.org/x/net/html/node.go5
-rw-r--r--vendor/golang.org/x/net/html/render.go3
2 files changed, 8 insertions, 0 deletions
diff --git a/vendor/golang.org/x/net/html/node.go b/vendor/golang.org/x/net/html/node.go
index 633ee15d..1350eef2 100644
--- a/vendor/golang.org/x/net/html/node.go
+++ b/vendor/golang.org/x/net/html/node.go
@@ -18,6 +18,11 @@ const (
ElementNode
CommentNode
DoctypeNode
+ // RawNode nodes are not returned by the parser, but can be part of the
+ // Node tree passed to func Render to insert raw HTML (without escaping).
+ // If so, this package makes no guarantee that the rendered HTML is secure
+ // (from e.g. Cross Site Scripting attacks) or well-formed.
+ RawNode
scopeMarkerNode
)
diff --git a/vendor/golang.org/x/net/html/render.go b/vendor/golang.org/x/net/html/render.go
index 8bf47ede..46879c08 100644
--- a/vendor/golang.org/x/net/html/render.go
+++ b/vendor/golang.org/x/net/html/render.go
@@ -134,6 +134,9 @@ func render1(w writer, n *Node) error {
}
}
return w.WriteByte('>')
+ case RawNode:
+ _, err := w.WriteString(n.Data)
+ return err
default:
return errors.New("html: unknown node type")
}