From bc9add73a138f0aacfc8fb3b846a8c3973a0dc6f Mon Sep 17 00:00:00 2001 From: Juriy Zaytsev Date: Sun, 14 Mar 2010 14:23:25 -0400 Subject: [PATCH] area's shape="rect" is a default attribute (strip it as part of "removeRedundantAttribute" option). --- src/htmlminifier.js | 6 +++++- tests/index.html | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) 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 }), '