Widget JS Error when run in an MVC site


I created a widget to put on the home page of an MVC site I’m in the process of making. When I run it in VS2013 using IE11 it throws the following error:

> JavaScript critical error at line 1, column 7 in http://platform.twitter.com/widgets.js\n\nSCRIPT1014: Invalid character

then when i continue I get some more info.

Unhandled exception at line 62, column 4283 in http://localhost:5682/d88159702ace4454923f5551cccc2a96/browserLink

0x800a138f - JavaScript runtime error: Unable to get property 'pingInterval' of undefined or null reference

In Opera it’s blank. I can copy the same widget code into an html page and it works no problem. Any help much appreciated.