p.oe.pop()
p.oe.pop()
p.form = nil
+ case "xmp":
+ p.popUntil(buttonScopeStopTags, "p")
+ p.reconstructActiveFormattingElements()
+ p.framesetOK = false
+ p.addElement(p.tok.Data, p.tok.Attr)
case "caption", "col", "colgroup", "frame", "head", "tbody", "td", "tfoot", "th", "thead", "tr":
// Ignore the token.
default:
// Render any child nodes.
switch n.Data {
- case "iframe", "noembed", "noframes", "noscript", "plaintext", "script", "style":
+ case "iframe", "noembed", "noframes", "noscript", "plaintext", "script", "style", "xmp":
for _, c := range n.Child {
if c.Type != TextNode {
return fmt.Errorf("html: raw text element <%s> has non-text child node", n.Data)
}
}
// Several tags flag the tokenizer's next token as raw.
- // The tag name lengths of these special cases ranges in [5, 9].
- if x := z.data.end - z.data.start; 5 <= x && x <= 9 {
+ // The tag name lengths of these special cases ranges in [3, 9].
+ if x := z.data.end - z.data.start; 3 <= x && x <= 9 {
switch z.buf[z.data.start] {
- case 'i', 'n', 'p', 's', 't', 'I', 'N', 'P', 'S', 'T':
+ case 'i', 'n', 'p', 's', 't', 'x', 'I', 'N', 'P', 'S', 'T', 'X':
switch s := strings.ToLower(string(z.buf[z.data.start:z.data.end])); s {
- case "iframe", "noembed", "noframes", "noscript", "plaintext", "script", "style", "textarea", "title":
+ case "iframe", "noembed", "noframes", "noscript", "plaintext", "script", "style", "textarea", "title", "xmp":
z.rawTag = s
}
}