From: stieler-it Date: Mon, 11 Nov 2013 06:36:48 +0000 (+0100) Subject: Added a comment to make the reason behind the expression more verbose X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=e199a02c34d8098fac775d11980c8bb423a222c5;p=html-minifier.git Added a comment to make the reason behind the expression more verbose --- diff --git a/src/htmlminifier.js b/src/htmlminifier.js index e5b2c21..3b65b42 100644 --- a/src/htmlminifier.js +++ b/src/htmlminifier.js @@ -76,7 +76,9 @@ function canRemoveAttributeQuotes(value) { // http://mathiasbynens.be/notes/unquoted-attribute-values - return (/^[^\x20\t\n\f\r"'`=<>]+$/).test(value) && !(/\/$/ ).test(value); + return (/^[^\x20\t\n\f\r"'`=<>]+$/).test(value) && !(/\/$/ ).test(value) && + // make sure trailing slash is not interpreted as HTML self-closing tag + !(/\/$/).test(value); } function attributesInclude(attributes, attribute) {