title: jQuery text() and html() behavior with script tags
body: <p>I have to parse the contents of a <code>&lt;script&gt;</code> tag which contains an XML string, the structure is  similar to this:</p>
  
  <pre><code>    &lt;!DOCTYPE html&gt;
      &lt;html&gt;
          &lt;head&gt;
             &lt;script id="def" type="text/xml"&gt;
                 &lt;?xml version="1.0" encoding="UTF-8"?&gt;
                 &lt;someroot&gt;
                     &lt;firsttag&gt;
                         &lt;script&gt;&lt;/script&gt;
                     &lt;/firsttag&gt;
                     &lt;secondtag&gt;
                         &lt;a&gt;asdsa&lt;/a&gt;
                     &lt;/secondtag&gt;
                 &lt;/someroot&gt;
             &lt;/script&gt;
          &lt;/head&gt;
          &lt;body&gt;
          &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>
  
  <p>The problem is that neither text() nor html() picks up the whole content of the inline script tag and the output is something like:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;someroot&gt;
      &lt;firsttag&gt;
         &lt;script&gt;
  </code></pre>
  
  <p><a href="http://jsfiddle.net/3gxEM/" rel="nofollow">JSFiddle Demo</a></p>
  
  <p>Is this the intended behavior or I'm doing something wrong?</p>