From: Juriy Zaytsev Date: Sun, 14 Mar 2010 18:23:25 +0000 (-0400) Subject: area's shape="rect" is a default attribute (strip it as part of "removeRedundantAttri... X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=bc9add73a138f0aacfc8fb3b846a8c3973a0dc6f;p=html-minifier.git area's shape="rect" is a default attribute (strip it as part of "removeRedundantAttribute" option). --- diff --git a/src/htmlminifier.js b/src/htmlminifier.js index 2bae5d1..fd7d940 100644 --- a/src/htmlminifier.js +++ b/src/htmlminifier.js @@ -77,7 +77,11 @@ (tag === 'a' && attrName === 'name' && - attributesInclude(attrs, 'id')) + attributesInclude(attrs, 'id')) || + + (tag === 'area' && + attrName === 'shape' && + attrValue === 'rect') ); } diff --git a/tests/index.html b/tests/index.html index 031cbe9..fab005b 100644 --- a/tests/index.html +++ b/tests/index.html @@ -354,6 +354,12 @@ equals(minify(input, { removeRedundantAttributes: true }), '