Fix bug involving autoclose and inline elements in strict <blockquote>.
commite013bc9126a97aff2feb8d4786a77e4c280ef666
authorEdward Z. Yang <edwardzyang@thewritingpot.com>
Sat, 2 Aug 2008 00:52:06 +0000 (1 20:52 -0400)
committerEdward Z. Yang <edwardzyang@thewritingpot.com>
Sat, 2 Aug 2008 00:52:06 +0000 (1 20:52 -0400)
tree4c55b66ede37dd2ed9045b3cd1c57108bc92512f
parent1d90bb239763da7ee4e0d84c8621307e5aac3868
Fix bug involving autoclose and inline elements in strict <blockquote>.

The newest autoclose code uses the elements property in whether or not an
element should be closed by a particular tag.  The heuristic is simple; if
the element doesn't allow that tag as a child, it closes the parent
container.  This doesn't work, however, with <blockquote>, which while not
allowing inline styles under Strict doctypes, requires them to be passed
through MakeWellFormed.

The fix was to transition MakeWellFormed to call a method to retrieve the
elements, and then have StrictBlockquote implement a special version of
this method.  Future versions of HTML Purifier may be more flexible in this
regard--further study of the HTML5 specification is required.

Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
NEWS
library/HTMLPurifier/ChildDef.php
library/HTMLPurifier/ChildDef/StrictBlockquote.php
library/HTMLPurifier/Strategy/MakeWellFormed.php
tests/HTMLPurifier/HTMLT/strict-blockquote-with-inline.htmlt [new file with mode: 0644]
tests/HTMLPurifier/Strategy/MakeWellFormedTest.php