From ea27fd1d03328d70705a5b3f9c2d5e5f84898812 Mon Sep 17 00:00:00 2001 From: stieler-it Date: Tue, 22 Oct 2013 11:56:53 +0200 Subject: [PATCH] Preserve quotes if attribute ends with a trailing slash minified URLs in parameters, like need to keept their quotes because is interpreted as an URL without trailing slash --- src/htmlminifier.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/htmlminifier.js b/src/htmlminifier.js index d07f221..e5b2c21 100644 --- a/src/htmlminifier.js +++ b/src/htmlminifier.js @@ -76,7 +76,7 @@ function canRemoveAttributeQuotes(value) { // http://mathiasbynens.be/notes/unquoted-attribute-values - return (/^[^\x20\t\n\f\r"'`=<>]+$/).test(value); + return (/^[^\x20\t\n\f\r"'`=<>]+$/).test(value) && !(/\/$/ ).test(value); } function attributesInclude(attributes, attribute) { -- 2.34.1