(tag === 'a' &&
attrName === 'name' &&
- attributesInclude(attrs, 'id'))
+ attributesInclude(attrs, 'id')) ||
+
+ (tag === 'area' &&
+ attrName === 'shape' &&
+ attrValue === 'rect')
);
}
equals(minify(input, { removeRedundantAttributes: true }), '<script>x=2,y=4<\/script>');
});
+ test('removing redundant attributes (<area shape="rect" ...>)', function(){
+ input = '<area shape="rect" coords="696,25,958,47" href="#" title="foo">';
+ output = '<area coords="696,25,958,47" href="#" title="foo">';
+ equals(minify(input, { removeRedundantAttributes: true }), output);
+ });
+
test('removing redundant attributes (<... = "javascript: ..." ...>)', function(){
input = '<p onclick="javascript:alert(1)">x</p>';
equals(minify(input, { cleanAttributes: true }), '<p onclick="alert(1)">x</p>');