#273 - avoid xhtml doctype flip/flop
This commit is contained in:
parent
7cf9fc2906
commit
6c1a2acea2
10
src/lexer.c
10
src/lexer.c
|
@ -1771,6 +1771,16 @@ Bool TY_(SetXHTMLDocType)( TidyDocImpl* doc )
|
||||||
TY_(RepairAttrValue)(doc, doctype, sys, GetSIFromVers(X10T));
|
TY_(RepairAttrValue)(doc, doctype, sys, GetSIFromVers(X10T));
|
||||||
lexer->versionEmitted = X10T;
|
lexer->versionEmitted = X10T;
|
||||||
}
|
}
|
||||||
|
else if (lexer->versions & VERS_HTML5)
|
||||||
|
{
|
||||||
|
/*\
|
||||||
|
* Issue #273 - If still a html5/xhtml5 bit
|
||||||
|
* existing, that is the 'ConstrainVersion' has
|
||||||
|
* not eliminated all HTML5, then nothing to do here.
|
||||||
|
* Certainly do **not** delete the DocType node!
|
||||||
|
* see: http://www.w3.org/QA/Tips/Doctype
|
||||||
|
\*/
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (doctype)
|
if (doctype)
|
||||||
|
|
Loading…
Reference in a new issue