Version 0.5.5
authorkangax <kangax@gmail.com>
Tue, 21 Jan 2014 19:02:16 +0000 (14:02 -0500)
committerkangax <kangax@gmail.com>
Tue, 21 Jan 2014 19:02:16 +0000 (14:02 -0500)
dist/all.js
index.html
package.json
src/htmlminifier.js

index 844e217..4f7ef2d 100644 (file)
   }
 })(typeof exports === 'undefined' ? this : exports);
 /*!
- * HTMLMinifier v0.5.4
+ * HTMLMinifier v0.5.5
  * http://kangax.github.com/html-minifier/
  *
  * Copyright (c) 2010-2013 Juriy "kangax" Zaytsev
 
   function collapseWhitespaceSmart(str, prevTag, nextTag) {
     // array of tags that will maintain a single space outside of them
-    var tags = ['a', 'abbr', 'acronym', 'b', 'big', 'button', 'code', 'del', 'dfn', 'em', 'font', 'i', 'ins', 'kbd', 'mark', 'q', 's', 'small', 'span', 'strike', 'strong', 'sub', 'sup', 'time', 'tt', 'u', 'var'];
+    var tags = ['a', 'abbr', 'acronym', 'b', 'bdi', 'bdo', 'big', 'button', 'cite', 'code', 'del', 'dfn', 'em', 'font', 'i', 'ins', 'kbd', 'mark', 'q', 'rt', 'rp', 's', 'samp', 'small', 'span', 'strike', 'strong', 'sub', 'sup', 'time', 'tt', 'u', 'var'];
 
     if (prevTag && prevTag !== 'img' && (prevTag.substr(0,1) !== '/'
       || ( prevTag.substr(0,1) === '/' && tags.indexOf(prevTag.substr(1)) === -1))) {
 
   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) &&
+    // make sure trailing slash is not interpreted as HTML self-closing tag
+        !(/\/$/).test(value);
   }
 
   function attributesInclude(attributes, attribute) {
index cec7988..b9dda8d 100644 (file)
@@ -9,7 +9,7 @@
     <div>
       <div id="outer-wrapper">
         <div id="wrapper">
-          <h1>HTML Minifier <span style="font-size: 0.6em">(v0.5.4)</span></h1>
+          <h1>HTML Minifier <span style="font-size: 0.6em">(v0.5.5)</span></h1>
           <p id="warning">
             Minifier is <strong>in beta</strong> and is <strong>not yet thoroughly tested</strong>. Use at your own risk.
           </p>
index 48c4d45..cf5e87c 100644 (file)
@@ -1,7 +1,7 @@
 {
   "name": "html-minifier",
   "description": "HTML minifier with lint-like capabilities.",
-  "version": "0.5.4",
+  "version": "0.5.5",
   "keywords": ["html", "minifier", "lint"],
   "url" : "http://github.com/kangax/html-minifier",
   "maintainers": [{
index 168ac2f..7b05ccb 100644 (file)
@@ -1,5 +1,5 @@
 /*!
- * HTMLMinifier v0.5.4
+ * HTMLMinifier v0.5.5
  * http://kangax.github.com/html-minifier/
  *
  * Copyright (c) 2010-2013 Juriy "kangax" Zaytsev