fix #178
authorsqrt <sqrt@entless.org>
Mon, 2 Jun 2014 23:38:59 +0000 (01:38 +0200)
committersqrt <sqrt@entless.org>
Mon, 2 Jun 2014 23:38:59 +0000 (01:38 +0200)
src/htmlminifier.js

index cf419c5..97fa0a9 100644 (file)
@@ -37,7 +37,7 @@
   }
 
   function collapseWhitespace(str) {
-    return str ? str.replace(/\s+/g, ' ') : str;
+    return str ? str.replace(/[\t\n\r ]+/g, ' ') : str;
   }
 
   function collapseWhitespaceSmart(str, prevTag, nextTag, options) {