Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
revert: fix($sce): allow IE7 standards mode to pass non-quirks mode test
Browse files Browse the repository at this point in the history
This reverts commit 637c9b1.
(ref #3633 and #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);
  });
  • Loading branch information
chirayuk committed Aug 23, 2013
1 parent a671b04 commit 699f86c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/ng/sce.js
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ function $SceProvider() {
// the "expression(javascript expression)" syntax which is insecure.
if (enabled && msie) {
var documentMode = $document[0].documentMode;
if (documentMode !== undefined && documentMode < 7) {
if (documentMode !== undefined && documentMode < 8) {
throw $sceMinErr('iequirks',
'Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks ' +
'mode. You can fix this by adding the text <!doctype html> to the top of your HTML ' +
Expand Down
10 changes: 1 addition & 9 deletions test/ng/sceSpecs.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,7 @@ describe('SCE', function() {
}

it('should throw an exception when sce is enabled in quirks mode', function() {
runTest(true, 5, true);
});

it('should NOT throw an exception when sce is enabled and in IE7 standards mode', function() {
runTest(true, 7, false);
runTest(true, 7, true);
});

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

it('should NOT throw an exception when sce is disabled even when in quirks mode', function() {
runTest(false, 5, false);
});

it('should NOT throw an exception when sce is disabled and in IE7 standards mode', function() {
runTest(false, 7, false);
});

Expand Down

0 comments on commit 699f86c

Please sign in to comment.