title: Including <script> elements in a custom infowindow
body: <p>I am using the Google Maps API to create a custom InfoWindow that contains fusion table content. I also want to embed content from an external site in the InfoWindow, but cannot get the  code to work. The embed code from the external site is:</p>
  
  <pre><code>    &lt;link type="text/css" rel="stylesheet" media="all" href="http://www.foodsecurityportal.org/sites/all/modules/tic_countries/tic_countries_widget.css" /&gt;
  &lt;div class="web-widgets-inline" id="web_widgets_inline_country_news_36"&gt;
  &lt;script src="http://www.foodsecurityportal.org/country/widget/36"&gt;&lt;/script&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I am trying to embed it into my InfoWindow as follows, with the external URL and ID referenced in my fusion table. My problem is that I cannot get the inline <code>&lt;/script&gt;</code> element to function. Including it in full as <code>&lt;/script&gt;</code> prevents the map from loading at all, whilst trying to break it up (e.g <code>"&lt;"+"/script&gt;"</code> (as in the below snippet) prevents the embedded script from running.</p>
  
  <p>Any ideas? Please give a full explanation if possible as I'm a novice. Many thanks.</p>
  
  <pre><code>function initialize() {
    map = new google.maps.Map(document.getElementById('map_canvas'), {
      center: new google.maps.LatLng(10, 30),
      zoom: 2,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    });
  
    layer = new google.maps.FusionTablesLayer(tableid);
    layer.setQuery("SELECT 'Country Geometry' FROM " + tableid);
    layer.setMap(map);
  
    layer2 = new google.maps.FusionTablesLayer(tableid2);
    layer2.setQuery("SELECT 'Site Location' FROM " + tableid2);
    layer2.setMap(map);
  
  
    google.maps.event.addListener(layer, 'click', function(e) {
  
  
  e.infoWindowHtml = "&lt;div class='googft-info-window' style='font-family: sans-serif; width: 500px; height: 300px; overflow: auto;'&gt;"
  
  e.infoWindowHtml += "&lt;b&gt;" + e.row['Site Name'].value + "&lt;/b&gt;&lt;br /&gt;"
  
  e.infoWindowHtml += "&lt;img src=" + e.row['Image URL'].value + "&gt;&lt;br /&gt;"
  
  e.infoWindowHtml += "&lt;link type=text/css rel=stylesheet media=all href=http://www.foodsecurityportal.org/sites/all/modules/tic_countries/tic_countries_widget.css /&gt;"
  
  e.infoWindowHtml += "&lt;div class=" + e.row['IFPRI Ref1'].value + " style='width: 95%; height: 150px; overflow: auto;'&gt;"
  
  e.infoWindowHtml += "&lt;script src=" + e.row['IFPRI Ref2'].value + "type='text/javascript'&gt;&lt;"+"/script&gt;"
  
  e.infoWindowHtml +=  "&lt;/div&gt;&lt;/div&gt;"
  
    });
  </code></pre>