bug in IE8 - quirks mode

253 views
Skip to first unread message

Surreal

unread,
Feb 4, 2014, 3:20:52 PM2/4/14
to ang...@googlegroups.com
Hi,

I made a quick test to check if my app was compatible with IE7+.
Weirdly, it works in IE7 but I get this error in IE8 (http://docs.angularjs.org/error/$sce: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 document. See http://docs.angularjs.org/api/ng.$sce for more information.

I specified the right doctype though:

<html>
<head>
  
<meta charset="utf-8">
  
<title>Selecteur cartes - demo</title>
  
<link rel="stylesheet" href="css/app.css">
  
<link rel="stylesheet" href="css/bootstrap.css">
  
<script src="lib/xml2json.js"></script>
  
<!--[if lte IE 8]>
      <script src="/path/to/json2.js"></script>
    <![endif]-->

  
<script src="lib/angular/angular.js"></script>
  
<script src="js/controllers.js"></script>
</head>
<body>

  
<div id="ng-app" ng-app="cardsApp">
    
<div ng-controller="CardsListCtrl">
      
<div>
        Recherche : 
<input ng-model="query">
      
</div>
      
<div>
        
<ul>
          
<li ng-repeat="card in cards | filter:query">
            {{card.nom}}
            
<p>{{card.typecarte}}</p>
          
</li>
        
</ul>

      
</div>
      
    
</div>
  
</div>

</body>
</html>

So you know, I can control what's inside the <body> element.

Has anybody an idea ?
Thanks

Jeff Hubbard

unread,
Feb 4, 2014, 4:40:29 PM2/4/14
to ang...@googlegroups.com
I don't see a DTD on your pasted code. There should be an element above the `<html>` that has: `<!doctype html>`.

Surreal

unread,
Feb 5, 2014, 5:08:52 AM2/5/14
to ang...@googlegroups.com
Hi,

Copy-paste error, I included the doctype element on top of my file indeed:

<!doctype html>

Actually, the error message disappeared after I removed all the css styles from the file, it should have come from there.

Thanks for your reply anyway !
Reply all
Reply to author
Forward
0 new messages