escaped title attribute becomes unescaped in jquery
<p>I am displaying photo with user generated title in popup using fancybox. while trying to get the escaped title displayed in the popup, I noticed the following behavior:</p>

<pre><code>console.log( $("&lt;a title=\"&amp;lt;script&amp;gt;alert('test')&amp;lt;/script&amp;gt;\"&gt;").attr('title') );
</code></pre>

<p>output: <code>&lt;script&gt;alert('test')&lt;/script&gt;</code></p>

<pre><code>console.log( $("&lt;p&gt;&amp;lt;script&amp;gt;alert('test')&amp;lt;/script&amp;gt;&lt;/p&gt;").html() );
</code></pre>

<p>output: <code>&amp;lt;script&amp;gt;alert('test')&amp;lt;/script&amp;gt;</code></p>

<pre><code>console.log( $("&lt;p&gt;&amp;lt;script&amp;gt;alert('test')&amp;lt;/script&amp;gt;&lt;/p&gt;").text() );
</code></pre>

<p>output: <code>&lt;script&gt;alert('test')&lt;/script&gt;</code></p>

<p>my problem is that the title in the popup window is by calling <code>obj.attr('title')</code> which returns the unescaped title instead of the escaped one. </p>

<p>How do I get the escaped title in <code>obj.attr('title')</code> call?</p>
