Skip to content

Commit 51bf67a

Browse files
author
Bob Chao
committed
fix($sanitize): reduce stack height
Update Internet Explorer-only helper function stripCustomNsAttrs to be less recursive. Reduce stack height of function causing out of stack space error. Closes angular#14928
1 parent 74732d0 commit 51bf67a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

test/ngSanitize/sanitizeSpec.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,12 @@ describe('HTML', function() {
134134
// Large is non-trivial to quantify, but handling 100,000 should be sufficient for most purposes.
135135
var largeNumber = 100000; // 100,000
136136
var element = '<div>b</div>';
137-
var largeDataset = '';
138137
var result = '';
139138
// Ideally we would use repeat, but that isn't supported in IE.
140139
for (var i = 0; i < largeNumber; i++) {
141-
largeDataset += element;
142140
result += element;
143141
}
144-
expectHTML('a' + largeDataset + 'c').toEqual('a' + result + 'c');
142+
expectHTML('a' + result + 'c').toEqual('a' + result + 'c');
145143
});
146144

147145
it('should remove style', function() {

0 commit comments

Comments
 (0)