Mikio Hara
a33f666f30
html: gofmt -w -s
...
Change-Id: I2da52ff2afbf0417dbe6c08105fafeb168e936ee
Reviewed-on: https://go-review.googlesource.com/c/net/+/169358
Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Daniel Martí <mvdan@mvdan.cc >
2019-03-26 08:36:53 +00:00
Tom Anthony
e3b2ff56ed
html: fix parsing where nested tags of unknown types inadvertently close one another
...
The existing implementation behaves differently to all major browsers, for the instance where a self-closing element of an unknown tag type is the child of another element of an unknown tag type. The issue appears to be that nested tags of an differing unknown types will all have an atom value of 0 and `inBodyEndTagOther` will incorrectly match them to one another.
Fixes golang/go#30961
Change-Id: I62b0aa49c027c8432df7d077ffba135201b3b786
GitHub-Last-Rev: fb25181f9a
GitHub-Pull-Request: golang/net#37
Reviewed-on: https://go-review.googlesource.com/c/net/+/168638
Reviewed-by: Nigel Tao <nigeltao@golang.org >
2019-03-24 22:39:53 +00:00
Kunpei Sakai
3a22650c66
html: remove unnecessary break
...
The ancestor doesn't always match with the first.
Change-Id: I0edcbffab7e19ba1731e849021ffbb7428ec48d7
Reviewed-on: https://go-review.googlesource.com/c/161857
Run-TryBot: Kunpei Sakai <namusyaka@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Nigel Tao <nigeltao@golang.org >
2019-02-13 06:11:40 +00:00
Kunpei Sakai
d26f9f9a57
html: update inSelectIM and inSelectInTableIM for the latest spec
...
Fixes golang/go#27842
Change-Id: I06eb3c0c18be3566bd30a29fca5f3f7e6791d2cc
Reviewed-on: https://go-review.googlesource.com/c/137275
Run-TryBot: Kunpei Sakai <namusyaka@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Nigel Tao <nigeltao@golang.org >
2019-01-25 09:10:13 +00:00
Kunpei Sakai
f5e5bdd778
html: remove unnecessary namespace checking
...
Change-Id: I03ebb4369389262b842001e18d0594fd71b19f44
Reviewed-on: https://go-review.googlesource.com/c/138797
Run-TryBot: Kunpei Sakai <namusyaka@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Nigel Tao <nigeltao@golang.org >
2018-10-03 01:32:48 +00:00
Kunpei Sakai
cf3bd585ca
html: don't set im if <template> doesn't have HTML namespace
...
If there are nested <template> elements and the <template> node isn't in HTML namespace,
couldn't continue to parse documents correctly.
By this patch, it makes the <template> which is in math namespace be skipped on
resetting insertion mode.
Fixes golang/go#27702
Change-Id: I6eacdb98fe29eb3c61781afca5bc4d83e72ba4ed
Reviewed-on: https://go-review.googlesource.com/136875
Reviewed-by: Nigel Tao <nigeltao@golang.org >
2018-09-25 07:13:36 +00:00
Kunpei Sakai
2f5d238892
html: avoid panic even if unconsidered <isindex> and <template> combination
...
The <isindex> element has been removed from the spec so that the
<template> element doesn't cover it.
To avoid panic, this commit adds ignoring code as a workaround.
Fixes golang/go#27704
Change-Id: I847391389285df2fc0eb6a795f8c93b481cdebac
Reviewed-on: https://go-review.googlesource.com/136575
Reviewed-by: Nigel Tao <nigeltao@golang.org >
2018-09-21 00:03:56 +00:00
Nigel Tao
161cd47e91
html: add more comments to Parse and ParseFragment
...
They implement the HTML5 parsing algorithm, which is very complicated.
Fixes golang/go#26973
Change-Id: I83a5753ab00fe84f73797fcecd309306d9f24819
Reviewed-on: https://go-review.googlesource.com/133695
Reviewed-by: Kunpei Sakai <namusyaka@gmail.com >
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org >
2018-09-06 23:31:01 +00:00
Kunpei Sakai
8a410e7b63
html: fix wrong comparison in foster parenting algorithm
...
Fixes golang/go#23071
Change-Id: I383e13bfd87e32ffb775dff54c46b66b090e5017
Reviewed-on: https://go-review.googlesource.com/131475
Run-TryBot: Kunpei Sakai <namusyaka@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Nigel Tao <nigeltao@golang.org >
2018-08-26 01:23:51 +00:00
Kunpei Sakai
faa378e6db
html: handle end-of-file cases correctly
...
Updates golang/go#23071
Change-Id: I02a61109b5738759a9ee3e448981778de7d0ff62
Reviewed-on: https://go-review.googlesource.com/130795
Run-TryBot: Kunpei Sakai <namusyaka@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Nigel Tao <nigeltao@golang.org >
2018-08-24 04:51:31 +00:00
Kunpei Sakai
aaf6012214
html: remove special procedure for <template> in frameset im
...
See more details: https://bugs.chromium.org/p/chromium/issues/detail?id=829668
Updates golang/go#23071
Change-Id: Ib9c963269f814c3f21d3784754729df57dcc8f90
Reviewed-on: https://go-review.googlesource.com/123776
Run-TryBot: Kunpei Sakai <namusyaka@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Nigel Tao <nigeltao@golang.org >
2018-08-16 10:28:01 +00:00
Kunpei Sakai
c394268923
html: don't ignore token when current token is not <template>
...
Updates golang/go#23071
Change-Id: I36b0ee58f61b7de25730e0fb082eeb7ef2787594
Reviewed-on: https://go-review.googlesource.com/123920
Run-TryBot: Kunpei Sakai <namusyaka@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Nigel Tao <nigeltao@golang.org >
2018-08-11 02:16:10 +00:00
Kunpei Sakai
32a936f463
html: don't ignore the token if the current node is form
...
See: https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inbody
Fixes golang/go#25703
Updates golang/go#23071
Change-Id: I09db4c2d07a242cb45c3e37b499c609809dd0b83
Reviewed-on: https://go-review.googlesource.com/120658
Run-TryBot: Kunpei Sakai <namusyaka@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Nigel Tao <nigeltao@golang.org >
2018-07-06 05:13:57 +00:00
Kunpei Sakai
d41e817464
html: handle rb and rtc elements
...
Updates golang/go#23071
Change-Id: Ifef79e077801422eb273af3e5a541c85c63bfce4
Reviewed-on: https://go-review.googlesource.com/107575
Reviewed-by: Nigel Tao <nigeltao@golang.org >
2018-04-18 06:21:11 +00:00
Kunpei Sakai
8d16fa6dc9
html: avoid invalid nil pointer access
...
Updates golang/go#23071
Change-Id: I73d7302c5bde4441aa824093fdcce52e8bb51e31
Reviewed-on: https://go-review.googlesource.com/107379
Run-TryBot: Kunpei Sakai <namusyaka@gmail.com >
Reviewed-by: Nigel Tao <nigeltao@golang.org >
2018-04-17 00:37:50 +00:00
namusyaka
500e7a4f95
html: add "in template" insertion mode support
...
See:
https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-intemplate
Updates golang/go#23071
Change-Id: I36529b7cf5d2adf159ed5c471fba9f67890b7eb9
Reviewed-on: https://go-review.googlesource.com/94838
Run-TryBot: Kunpei Sakai <namusyaka@gmail.com >
TryBot-Result: Gobot Gobot <gobot@golang.org >
Reviewed-by: Nigel Tao <nigeltao@golang.org >
2018-04-15 21:43:07 +00:00
namusyaka
2e7f24ace3
html: update section numbers
...
Updates golang/go#23071
See https://html.spec.whatwg.org/multipage/
Change-Id: I1bde6e07ae9270ba7b320474b9bec8ec09a79f16
Reviewed-on: https://go-review.googlesource.com/94355
Reviewed-by: Nigel Tao <nigeltao@golang.org >
2018-02-16 11:01:04 +00:00
Dmitry Savintsev
3d87fd621c
x/net/html: Sync the html parser and atom with the current whatwg spec
...
The current documentation as well as set of atoms and attributes has
gotten slightly out of sync with the current state of the WHATWG
html5 specification. The change adds and removes several of the atoms
and attributes, updates the documentation (such as steps numbering in
inBodyEndTagFormatting) and modifies the spec URLs to https://
Change-Id: I6dfa52785858c1521301b20b1e585e19a08b1e98
Reviewed-on: https://go-review.googlesource.com/6173
Reviewed-by: Nigel Tao <nigeltao@golang.org >
2015-03-03 04:37:39 +00:00
Andrew Gerrand
fbe893ddcd
go.net: use golang.org/x/... import paths
...
LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/167030043
2014-11-10 09:04:43 +11:00
Frederick Kelly Mayle III
5755bc4e75
go.net/html: Fix comment handling for "in select" insertion mode
...
LGTM=andybalholm, nigeltao
R=golang-codereviews, gobot, nigeltao, andybalholm
CC=golang-codereviews
https://golang.org/cl/93680045
2014-06-12 11:53:57 +10:00
Nigel Tao
ea127e889c
go.net/html: move exp/html and exp/html/atom here to the go.net
...
sub-repo.
It's a straight copy, except for these modifications:
* "exp/html" and "exp/html/atom" imports were renamed, and
* the "TODO... When this package moves out of exp" comment was
deleted from atom/atom.go.
The matching change is at https://golang.org/cl/7317043
The rationale was discussed at
https://groups.google.com/d/topic/golang-nuts/Qq5hTQyPuLg/discussion
R=adg, remyoudompheng, dave
CC=golang-dev
https://golang.org/cl/7310063
2013-02-11 11:55:20 +11:00