public
/
html-minifier.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
88b3692
)
Added a comment to make the reason behind the expression more verbose
author
stieler-it
<michael@stieler.it>
Mon, 11 Nov 2013 06:36:48 +0000
(07:36 +0100)
committer
stieler-it
<michael@stieler.it>
Mon, 11 Nov 2013 06:36:48 +0000
(07:36 +0100)
src/htmlminifier.js
patch
|
blob
|
history
diff --git
a/src/htmlminifier.js
b/src/htmlminifier.js
index
e5b2c21
..
3b65b42
100644
(file)
--- 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) {