RemexCompatMunger: Don't call endTag() in case B/b
authorTim Starling <tstarling@wikimedia.org>
Mon, 6 Aug 2018 02:30:51 +0000 (12:30 +1000)
committerKunal Mehta <legoktm@member.fsf.org>
Sun, 21 Oct 2018 18:54:29 +0000 (11:54 -0700)
commit25b0bce762fd4d5c84a63ca62d69ba67ee6200be
tree9d6bbe12275c635a05b37b165eff364904a43bec
parentb1baa56b84ec34191c14b835dbcd6734a784b585
RemexCompatMunger: Don't call endTag() in case B/b

This was naïve, the linked bug documents a case where endTag() was
called despite children of the p-wrap still being in TreeBuilder's
stack. Instead, wait for the parent of the p-wrap to have endTag()
called on it, I've submitted a patch which will clean up the node in
that case.

Bug: T200827
Change-Id: I34694813eace9cadabf2db8f9ccca83d1368cfad
(cherry picked from commit 10c8cfea305ec1d450b16ad54ebddb5f910016f4)
includes/tidy/RemexCompatMunger.php
tests/phpunit/includes/tidy/RemexDriverTest.php