From e8013a74b8ec87cd595077b4ff5f9d209be47d00 Mon Sep 17 00:00:00 2001 From: Steven Le Date: Tue, 19 Jun 2012 09:39:06 -0700 Subject: [PATCH 1/2] Remove as a proprietary tag. --- src/tags.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/src/tags.c b/src/tags.c index 78d0357..06e114f 100644 --- a/src/tags.c +++ b/src/tags.c @@ -5,9 +5,9 @@ CVS Info : - $Author: hoehrmann $ - $Date: 2008/08/09 11:55:27 $ - $Revision: 1.71 $ + $Author: hoehrmann $ + $Date: 2008/08/09 11:55:27 $ + $Revision: 1.71 $ The HTML tags are stored as 8 bit ASCII strings. @@ -277,7 +277,6 @@ static const Dict tag_defs[] = { TidyTag_SERVER, "server", VERS_NETSCAPE, NULL, (CM_HEAD|CM_MIXED|CM_BLOCK|CM_INLINE), TY_(ParseScript), NULL }, { TidyTag_SERVLET, "servlet", VERS_SUN, NULL, (CM_OBJECT|CM_IMG|CM_INLINE|CM_PARAM), TY_(ParseBlock), NULL }, { TidyTag_SPACER, "spacer", VERS_NETSCAPE, NULL, (CM_INLINE|CM_EMPTY), TY_(ParseEmpty), NULL }, - { TidyTag_WBR, "wbr", VERS_PROPRIETARY, NULL, (CM_INLINE|CM_EMPTY), TY_(ParseEmpty), NULL }, /* HTML5 */ { TidyTag_ARTICLE, "article", VERS_ELEM_ARTICLE, &TY_(W3CAttrsFor_ARTICLE)[0], (CM_BLOCK), TY_(ParseBlock), NULL }, @@ -350,7 +349,7 @@ static void tagsRemoveFromHash( TidyDocImpl* doc, TidyTagImpl* tags, ctmbstr s ) { DictHash* next = p->next; if ( prev ) - prev->next = next; + prev->next = next; else tags->hashtab[h] = next; TidyDocFree(doc, p); @@ -446,7 +445,7 @@ static void FreeDict( TidyDocImpl* doc, Dict *d ) } static void declare( TidyDocImpl* doc, TidyTagImpl* tags, - ctmbstr name, uint versions, uint model, + ctmbstr name, uint versions, uint model, Parser *parser, CheckAttribs *chkattrs ) { if ( name ) @@ -486,7 +485,7 @@ Bool TY_(FindTag)( TidyDocImpl* doc, Node *node ) node->tag = np; return yes; } - + return no; } @@ -498,7 +497,7 @@ const Dict* TY_(LookupTagDef)( TidyTagId tid ) if (np->id == tid) return np; - return NULL; + return NULL; } Parser* TY_(FindParser)( TidyDocImpl* doc, Node *node ) @@ -573,7 +572,7 @@ ctmbstr TY_(GetNextDeclaredTag)( TidyDocImpl* ARG_UNUSED(doc), curr->parser == TY_(ParseBlock) ) name = curr->name; break; - + case tagtype_pre: if ( (curr->model & CM_BLOCK) != 0 && curr->parser == TY_(ParsePre) ) @@ -703,7 +702,7 @@ void CheckIMG( TidyDocImpl* doc, Node *node ) doc->badAccess |= BA_MISSING_IMAGE_ALT; TY_(ReportMissingAttr)( doc, node, "alt" ); } - + if ( cfgStr(doc, TidyAltText) ) TY_(AddAttribute)( doc, node, "alt", cfgStr(doc, TidyAltText) ); } @@ -818,7 +817,7 @@ Bool TY_(nodeHasText)( TidyDocImpl* doc, Node* node ) Bool TY_(nodeIsElement)( Node* node ) { - return ( node && + return ( node && (node->type == StartTag || node->type == StartEndTag) ); } @@ -828,7 +827,7 @@ Bool TY_(nodeIsElement)( Node* node ) */ Bool nodeMatchCM( Node* node, uint contentModel ) { - return ( node && node->tag && + return ( node && node->tag && (node->tag->model & contentModel) == contentModel ); } #endif @@ -837,7 +836,7 @@ Bool nodeMatchCM( Node* node, uint contentModel ) */ Bool TY_(nodeHasCM)( Node* node, uint contentModel ) { - return ( node && node->tag && + return ( node && node->tag && (node->tag->model & contentModel) != 0 ); } @@ -860,8 +859,8 @@ Bool TY_(nodeIsHeader)( Node* node ) return ( tid && ( tid == TidyTag_H1 || tid == TidyTag_H2 || - tid == TidyTag_H3 || - tid == TidyTag_H4 || + tid == TidyTag_H3 || + tid == TidyTag_H4 || tid == TidyTag_H5 || tid == TidyTag_H6 )); } From 57a98b97b64ef61bc482e6a9720d77060af78192 Mon Sep 17 00:00:00 2001 From: Steven Le Date: Tue, 19 Jun 2012 15:42:48 -0700 Subject: [PATCH 2/2] Changed W3CAttrsFor_VIDEO -> W3CAttrsFor_WBR --- src/tags.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tags.c b/src/tags.c index 06e114f..d7b674d 100644 --- a/src/tags.c +++ b/src/tags.c @@ -304,7 +304,7 @@ static const Dict tag_defs[] = { TidyTag_TIME, "time", VERS_ELEM_TIME, &TY_(W3CAttrsFor_TIME)[0], (CM_INLINE), TY_(ParseInline), NULL }, { TidyTag_TRACK, "track", VERS_ELEM_TRACK, &TY_(W3CAttrsFor_TRACK)[0], (CM_BLOCK|CM_EMPTY), TY_(ParseBlock), NULL }, { TidyTag_VIDEO, "video", VERS_ELEM_VIDEO, &TY_(W3CAttrsFor_VIDEO)[0], (CM_BLOCK|CM_INLINE), TY_(ParseBlock), NULL }, - { TidyTag_WBR, "wbr", VERS_ELEM_WBR, &TY_(W3CAttrsFor_VIDEO)[0], (CM_INLINE|CM_EMPTY), TY_(ParseEmpty), NULL }, + { TidyTag_WBR, "wbr", VERS_ELEM_WBR, &TY_(W3CAttrsFor_WBR)[0], (CM_INLINE|CM_EMPTY), TY_(ParseEmpty), NULL }, /* this must be the final entry */ { (TidyTagId)0, NULL, 0, NULL, (0), NULL, NULL }