On Fri, Jul 29, 2011 at 1:10 PM, Philip Tzou <philip.npc(a)gmail.com> wrote:
But without Tidy support, the <source> tag would
break <dd> tag, cause the
<dd> unclosed, ruin everything.
<source> is a magic tag that's interpreted during parsing and
converted to HTML. Tidy only sees the resulting HTML, and that only
contains a <pre> with some inline markup inside it, nothing that would
auto-close a <dd> tag. Per HTML5, the only things that will
auto-close <dd> are <dd> and <dt>, plus closing tags for parents of
the <dd>.
(If you're interested in the details, you can read the standard here,
although be warned it's rather dense:
<http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#tree-construction>
The most recent versions of all browsers follow the standard for HTML
parsing pretty exactly, although in the case of IE it's only in
IE10PP2, and for Opera only private dev builds. Tidy doesn't follow
the standard, though, and might have funny ideas about what's okay to
let through.)