Skip to content

Commit 699f86c

Browse files
committed
revert: fix($sce): allow IE7 standards mode to pass non-quirks mode test
This reverts commit 637c9b1. (ref angular#3633 and angular#3646) The minimum bar for $sce is IE8 in standards mode. IE7 standards mode is not supported. If you must support IE7, you should disable $sce completely. angular.module('ie7support', []).config(function($sceProvider) { // Completely disable SCE to support IE7. $sceProvider.enabled(false); });
1 parent a671b04 commit 699f86c

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

src/ng/sce.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ function $SceProvider() {
620620
// the "expression(javascript expression)" syntax which is insecure.
621621
if (enabled && msie) {
622622
var documentMode = $document[0].documentMode;
623-
if (documentMode !== undefined && documentMode < 7) {
623+
if (documentMode !== undefined && documentMode < 8) {
624624
throw $sceMinErr('iequirks',
625625
'Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks ' +
626626
'mode. You can fix this by adding the text <!doctype html> to the top of your HTML ' +

test/ng/sceSpecs.js

+1-9
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,7 @@ describe('SCE', function() {
5858
}
5959

6060
it('should throw an exception when sce is enabled in quirks mode', function() {
61-
runTest(true, 5, true);
62-
});
63-
64-
it('should NOT throw an exception when sce is enabled and in IE7 standards mode', function() {
65-
runTest(true, 7, false);
61+
runTest(true, 7, true);
6662
});
6763

6864
it('should NOT throw an exception when sce is enabled and in standards mode', function() {
@@ -74,10 +70,6 @@ describe('SCE', function() {
7470
});
7571

7672
it('should NOT throw an exception when sce is disabled even when in quirks mode', function() {
77-
runTest(false, 5, false);
78-
});
79-
80-
it('should NOT throw an exception when sce is disabled and in IE7 standards mode', function() {
8173
runTest(false, 7, false);
8274
});
8375

0 commit comments

Comments
 (0)