title: Outputting jquery.html() to be used in an email
body: <p>I'm sorry for the length of this question, but I want to make sure I give the facts.</p>
  
  <p>I have a new ad server which does 99% of what I need. The one area it doesn't work so great in is in sending text ads. Here's the scenario. I need to send an email and this email needs some text ads in case the user has images turned off. Our email client (Lyris) uses <code>httpget</code> to grab our dynamically generated page. Now here is where the problem lies. The new ad server uses JavaScript to grab the ads off of their server. They offer email compliant tags, but nothing for text ads. So I thought I would load the text ad using their standard javascript on a page. I would then pull that data into a variable based on an ID. Ex: span id="ad" </p>
  
  <p>Here is the jQuery code:</p>
  
  <pre><code>var j = jQuery.noConflict();    
  j(document).ready(function () {
  
    var ad = j('#jscript').html().replace(/&lt;script\b[^&lt;]*(?:(?!&lt;\/script&gt;)&lt;[^&lt;]*)*&lt;\/script&gt;/gi,''); 
  
    j('#ad').html(ad)
  
  }); 
  </code></pre>
  
  <p>Here is my script code to call my ad position and display on the screen:</p>
  
  <pre><code>&lt;span id="jscript" style="display:none"&gt;
  &lt;script&gt;
  &lt;!--
      OAS_AD('Position1');  
  --&gt;
  &lt;/script&gt;
  &lt;/span&gt;
  </code></pre>
  
  <p>So I'm grabbing the data based on my span id and then removing any reference to script tags. What I'm left with is just the text of the ad, which is perfect. I can dump that on the screen and it looks and works great when viewing through a browser. But because I'm doing all of this in jQuery when I send through Lyris it obviously ignores my javascript.</p>
  
  <p>So how would I be able to output the results of <code>var ad = j('#jscript').html().replace(/)&lt;[^&lt;])&lt;\/script&gt;/gi,'');</code> into something my email client won't ignore?</p>