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

Commit 9b6ca3c

Browse files
committed
Merge pull request #316 from rwjblue/remove-es5-in-tests
Fix tests under ES3 browsers - forEach.
2 parents 0284281 + 8b4e41d commit 9b6ca3c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/morph-attr/tests/attr-morph/sanitize-attribute-value-test.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { sanitizeAttributeValue } from "morph-attr/sanitize-attribute-value";
22
import SafeString from "htmlbars-util/safe-string";
3+
import { forEach } from "htmlbars-util/array-utils";
34

45
import DOMHelper from "../../dom-helper";
56

@@ -99,9 +100,9 @@ var someIllegalProtocols = [
99100
'vbscript'
100101
];
101102

102-
badTags.forEach(function(tagName) {
103-
badAttributes.forEach(function(attrName) {
104-
someIllegalProtocols.forEach(function(protocol) {
103+
forEach(badTags, function(tagName) {
104+
forEach(badAttributes, function(attrName) {
105+
forEach(someIllegalProtocols, function(protocol) {
105106
test(' <' + tagName + ' ' + attrName + '="' + protocol + ':something"> ...', function() {
106107
equal(sanitizeAttributeValue(domHelper, { tagName: tagName }, attrName, protocol + ':something'), 'unsafe:' + protocol + ':something');
107108
});

0 commit comments

Comments
 (0)