Internet Explorer markup errors when using Google Feed API in master page

≡放荡痞女 提交于 2019-12-22 00:20:09

问题


I'm using Google Feed API to display an RSS-feed on a customers SharePoint intranet, which works perfect with Chrome, Firefox and other modern browsers. The exception is of course Internet Explorer, both 10 and 11 which we've committed to support. The feed is shown only some times, but the errors thrown in the developer console of IE10 or IE11 are always thrown, even when the feed is displayed.

I reference the jsapi source as Google suggests, with a regular <script> tag like

<script type="text/javascript" src="http://www.google.com/jsapi"></script>

The weird behaviour from Internet Explorer occurs in two different ways.

If I load the feeds here like this

<script type="text/javascript">   
    //lots of other stuff to be run...
    google.load("feeds", "1");
</script>

in the end of the document, I get the error

HTML1512: Unmatched end tag.

If I instead initialize it in a <script> block of it's own, I get the following error thrown sometimes, and some other times, I get the first one.

HTML1504: Unexpected end tag.

The behaviour is highly irregular and there appears to be no pattern when it works and when it doesn't.

The obvious answer to this question is that IE10 and IE11 is correct, and that Chrome and other browsers ignore the flaws in my markup, but I've run it through validators and checked it tag by tag and there are no missing opening or end tags. I've also commented out the google.load part, and the errors disappear.

I found a similar but unanswered topic here on SO that is related to this issue.

Why does Google Visualization cause HTML1504 Unexpected end tag errors?

Has anyone else experienced this? What causes this and how can it be solved?

来源:https://stackoverflow.com/questions/28432708/internet-explorer-markup-errors-when-using-google-feed-api-in-master-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!