]> Cypherpunks repositories - gostls13.git/commit
exp/html: fix foster-parenting when elements are implicitly closed
authorAndrew Balholm <andybalholm@gmail.com>
Mon, 6 Aug 2012 23:35:09 +0000 (09:35 +1000)
committerNigel Tao <nigeltao@golang.org>
Mon, 6 Aug 2012 23:35:09 +0000 (09:35 +1000)
commit2276ab92c116b8ae376fd28850bb0cf845f6de49
tree2baae9d1a98f58f5082f746756b434e65a5e3fa4
parente1cf7d6fb69223bc6e1fd0f312dfe2b4df52f896
exp/html: fix foster-parenting when elements are implicitly closed

When an element (like <nobr> or <p>) was implicitly closed by another
start tag, it would keep foster parenting from working because
the check for what was on top of the stack of open elements was
in the wrong place.

Move the check to addChild.

Pass 2 additional tests.

R=nigeltao
CC=golang-dev
https://golang.org/cl/6460045
src/pkg/exp/html/parse.go
src/pkg/exp/html/parse_test.go
src/pkg/exp/html/testlogs/tests26.dat.log
src/pkg/exp/html/testlogs/tricky01.dat.log