Case insensitive compare is safe here, and prevents erroneous propriertary attribute errors.

This commit is contained in:
Jim Derry 2017-05-12 08:28:11 -04:00
parent e7c28636b9
commit 982504eee0
1 changed files with 3 additions and 3 deletions

View File

@ -824,15 +824,15 @@ static const Attribute* attrsLookup(TidyDocImpl* doc,
#if ATTRIBUTE_HASH_LOOKUP
for (p = attribs->hashtab[attrsHash(atnam)]; p && p->attr; p = p->next)
if (TY_(tmbstrcmp)(atnam, p->attr->name) == 0)
if (TY_(tmbstrcasecmp)(atnam, p->attr->name) == 0)
return p->attr;
for (np = attribute_defs; np && np->name; ++np)
if (TY_(tmbstrcmp)(atnam, np->name) == 0)
if (TY_(tmbstrcasecmp)(atnam, np->name) == 0)
return attrsInstall(doc, attribs, np);
#else
for (np = attribute_defs; np && np->name; ++np)
if (TY_(tmbstrcmp)(atnam, np->name) == 0)
if (TY_(tmbstrcasecmp)(atnam, np->name) == 0)
return np;
#endif