fix for ISSUE #7: empty canvas no longer stripped
This commit is contained in:
parent
b0997b2c48
commit
f6a3bbecdb
|
@ -284,6 +284,11 @@ static Bool CanPrune( TidyDocImpl* doc, Node *element )
|
|||
if (nodeIsTEXTAREA(element))
|
||||
return no;
|
||||
|
||||
/* fix for ISSUE #7 https://github.com/w3c/tidy-html5/issues/7 */
|
||||
if (nodeIsCANVAS(element))
|
||||
return no;
|
||||
|
||||
|
||||
if ( attrGetID(element) || attrGetNAME(element) )
|
||||
return no;
|
||||
|
||||
|
|
|
@ -230,6 +230,6 @@ uint TY_(nodeHeaderLevel)( Node* node ); /* 1, 2, ..., 6 */
|
|||
#define nodeIsU( node ) TagIsId( node, TidyTag_U )
|
||||
#define nodeIsMENU( node ) TagIsId( node, TidyTag_MENU )
|
||||
#define nodeIsBUTTON( node ) TagIsId( node, TidyTag_BUTTON )
|
||||
|
||||
#define nodeIsCANVAS( node ) TagIsId( node, TidyTag_CANVAS )
|
||||
|
||||
#endif /* __TAGS_H__ */
|
||||
|
|
Loading…
Reference in a new issue