Is #726 #185 - HTML5 is case sensitive for anchors.

modified:   src/attrs.c
This commit is contained in:
Geoff McLane 2018-04-26 18:57:24 +02:00
parent 23429b1b77
commit 68e6b3c20e

View file

@ -997,13 +997,16 @@ void TY_(RemoveAnchorByNode)( TidyDocImpl* doc, ctmbstr name, Node *node )
FreeAnchor( doc, delme ); FreeAnchor( doc, delme );
} }
/* initialize new anchor */ /* initialize new anchor
Is. #726 & #185 - HTML5 is case-sensitive
*/
static Anchor* NewAnchor( TidyDocImpl* doc, ctmbstr name, Node* node ) static Anchor* NewAnchor( TidyDocImpl* doc, ctmbstr name, Node* node )
{ {
Anchor *a = (Anchor*) TidyDocAlloc( doc, sizeof(Anchor) ); Anchor *a = (Anchor*) TidyDocAlloc( doc, sizeof(Anchor) );
a->name = TY_(tmbstrdup)( doc->allocator, name ); a->name = TY_(tmbstrdup)( doc->allocator, name );
a->name = TY_(tmbstrtolower)(a->name); if (!TY_(IsHTML5Mode)(doc)) /* Is. #726 - if NOT HTML5, to lowercase */
a->name = TY_(tmbstrtolower)(a->name);
a->node = node; a->node = node;
a->next = NULL; a->next = NULL;