diff --git a/src/localize.c b/src/localize.c index 08778c1..3fe3b08 100755 --- a/src/localize.c +++ b/src/localize.c @@ -68,7 +68,7 @@ static struct _msgfmt /* attribute name */ { INSERTING_ATTRIBUTE, "%s inserting \"%s\" attribute" }, /* Warning in CheckLINK, Error otherwise */ - { INSERTING_AUTO_ATTRIBUTE, "%s inserting \"%s\" attribute using value \"%s\"" }, /* Error */ + { INSERTING_AUTO_ATTRIBUTE, "%s inserting \"%s\" attribute using value \"%s\"" }, /* Warning */ { MISSING_ATTR_VALUE, "%s attribute \"%s\" lacks value" }, /* Warning in CheckUrl, Error otherwise */ { UNKNOWN_ATTRIBUTE, "%s unknown attribute \"%s\"" }, /* Error */ { PROPRIETARY_ATTRIBUTE, "%s proprietary attribute \"%s\"" }, /* Error */ diff --git a/src/tags.c b/src/tags.c index 08bc6c4..35a172c 100644 --- a/src/tags.c +++ b/src/tags.c @@ -852,14 +852,15 @@ void CheckIMG( TidyDocImpl* doc, Node *node ) if ( !HasAlt ) { - if ( cfg(doc, TidyAccessibilityCheckLevel) == 0 && !cfgStr(doc, TidyAltText) ) + ctmbstr alttext = cfgStr(doc, TidyAltText); + if ( ( cfg(doc, TidyAccessibilityCheckLevel) == 0 ) && ( !alttext ) ) { doc->badAccess |= BA_MISSING_IMAGE_ALT; TY_(ReportMissingAttr)( doc, node, "alt" ); } - if ( cfgStr(doc, TidyAltText) ) { - AttVal *attval = TY_(AddAttribute)( doc, node, "alt", cfgStr(doc, TidyAltText) ); + if ( alttext ) { + AttVal *attval = TY_(AddAttribute)( doc, node, "alt", alttext ); TY_(ReportAttrError)( doc, node, attval, INSERTING_AUTO_ATTRIBUTE); } }