Skip to content
This repository was archived by the owner on Jul 15, 2019. It is now read-only.

Commit 9cfbfed

Browse files
committed
Merge pull request #24 from yahoo/disable-canonicalizing-ie-comments
disable canonicalizing IE cond. comments
2 parents f6d6b83 + a502682 commit 9cfbfed

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/html-purify.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ See the accompanying LICENSE file for terms.
2020
config = config || {};
2121
// defaulted to true
2222
config.enableCanonicalization = config.enableCanonicalization !== false;
23-
config.enableVoidingIEConditionalComments = config.enableVoidingIEConditionalComments !== false;
24-
2523
config.enableTagBalancing = config.enableTagBalancing !== false;
2624

2725
// accept array of tags to be whitelisted, default list in tag-attr-list.js
@@ -35,9 +33,9 @@ See the accompanying LICENSE file for terms.
3533
enableInputPreProcessing: true,
3634
enableStateTracking: false,
3735
enableCanonicalization: config.enableCanonicalization,
38-
enableVoidingIEConditionalComments: config.enableVoidingIEConditionalComments
36+
enableVoidingIEConditionalComments: false // comments are always stripped from the output anyway
3937
}).on('postWalk', function (lastState, state, i, endsWithEOF) {
40-
processTransition.call(that, lastState, state, i);
38+
processTransition.call(that, lastState, state, i);
4139
});
4240

4341
that.cssParser = new CssParser({"ver": "strict", "throwError": false});

0 commit comments

Comments
 (0)