vendor/golang.org/x/net/html/node.go
changeset 251 1c52a0eeb952
parent 242 2a9ec03fe5a1
equal deleted inserted replaced
250:c040f992052f 251:1c52a0eeb952
    16 	TextNode
    16 	TextNode
    17 	DocumentNode
    17 	DocumentNode
    18 	ElementNode
    18 	ElementNode
    19 	CommentNode
    19 	CommentNode
    20 	DoctypeNode
    20 	DoctypeNode
       
    21 	// RawNode nodes are not returned by the parser, but can be part of the
       
    22 	// Node tree passed to func Render to insert raw HTML (without escaping).
       
    23 	// If so, this package makes no guarantee that the rendered HTML is secure
       
    24 	// (from e.g. Cross Site Scripting attacks) or well-formed.
       
    25 	RawNode
    21 	scopeMarkerNode
    26 	scopeMarkerNode
    22 )
    27 )
    23 
    28 
    24 // Section 12.2.4.3 says "The markers are inserted when entering applet,
    29 // Section 12.2.4.3 says "The markers are inserted when entering applet,
    25 // object, marquee, template, td, th, and caption elements, and are used
    30 // object, marquee, template, td, th, and caption elements, and are used
   175 }
   180 }
   176 
   181 
   177 // contains returns whether a is within s.
   182 // contains returns whether a is within s.
   178 func (s *nodeStack) contains(a atom.Atom) bool {
   183 func (s *nodeStack) contains(a atom.Atom) bool {
   179 	for _, n := range *s {
   184 	for _, n := range *s {
   180 		if n.DataAtom == a {
   185 		if n.DataAtom == a && n.Namespace == "" {
   181 			return true
   186 			return true
   182 		}
   187 		}
   183 	}
   188 	}
   184 	return false
   189 	return false
   185 }
   190 }