diff options
Diffstat (limited to 'src/pkg/html/parse.go')
| -rw-r--r-- | src/pkg/html/parse.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/pkg/html/parse.go b/src/pkg/html/parse.go index 67356e450c..6962e64393 100644 --- a/src/pkg/html/parse.go +++ b/src/pkg/html/parse.go @@ -1572,6 +1572,19 @@ func afterAfterFramesetIM(p *parser) bool { Type: CommentNode, Data: p.tok.Data, }) + case TextToken: + // Ignore all text but whitespace. + s := strings.Map(func(c rune) rune { + switch c { + case ' ', '\t', '\n', '\f', '\r': + return c + } + return -1 + }, p.tok.Data) + if s != "" { + p.reconstructActiveFormattingElements() + p.addText(s) + } case StartTagToken: switch p.tok.Data { case "html": |
