diff --git a/src/htmlminifier.js b/src/htmlminifier.js
index <HASH>..<HASH> 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) {
Added a comment to make the reason behind the expression more verbose