Case insensitive compare is safe here, and prevents erroneous propriertary attribute errors.
This commit is contained in:
parent
e7c28636b9
commit
982504eee0
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue