Skip to content

Commit 68e6b3c

Browse files
committed
Is #726 #185 - HTML5 is case sensitive for anchors.
modified: src/attrs.c
1 parent 23429b1 commit 68e6b3c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/attrs.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -997,13 +997,16 @@ void TY_(RemoveAnchorByNode)( TidyDocImpl* doc, ctmbstr name, Node *node )
997997
FreeAnchor( doc, delme );
998998
}
999999

1000-
/* initialize new anchor */
1000+
/* initialize new anchor
1001+
Is. #726 & #185 - HTML5 is case-sensitive
1002+
*/
10011003
static Anchor* NewAnchor( TidyDocImpl* doc, ctmbstr name, Node* node )
10021004
{
10031005
Anchor *a = (Anchor*) TidyDocAlloc( doc, sizeof(Anchor) );
10041006

10051007
a->name = TY_(tmbstrdup)( doc->allocator, name );
1006-
a->name = TY_(tmbstrtolower)(a->name);
1008+
if (!TY_(IsHTML5Mode)(doc)) /* Is. #726 - if NOT HTML5, to lowercase */
1009+
a->name = TY_(tmbstrtolower)(a->name);
10071010
a->node = node;
10081011
a->next = NULL;
10091012

0 commit comments

Comments
 (0)