jquery escape character issue?
<p>I have this jquery issue that seems to only break when using background image url. My impression is that it looks like a character escape issue, but i could be wrong.</p>

<p>Here's what i have for a working demo version: <a href="http://jsfiddle.net/W4CZG/" rel="nofollow">http://jsfiddle.net/W4CZG/</a></p>

<p>Essentially i have some draggable divs with inline style in the html:</p>

<pre><code>&lt;div class="dragme" style="background-color:#ccc;"&gt;1&lt;/div&gt;
&lt;div class="dragme" style="background-image:url(images/image1.gif);"&gt;2&lt;/div&gt;
</code></pre>

<p>On the script, i've currently used the following to add a span tag inside the droppable area to set the style:</p>

<pre><code>$(this).html('&lt;span style="' + draggable.attr('style') + '"&gt;&lt;/span&gt;');
</code></pre>

<p>The first div, with the background color, works fine. Looking in firebug, it creates something like:</p>

<pre><code>&lt;span style="background-color: rgb(204, 204, 204);"&gt;&lt;/span&gt;
</code></pre>

<p>If i use any other style - like margin, font, etc - it works also. But my problem, and hence my question here, is with the background image, the generated span tag doesn't get the background image inline style, it instead gets all messed up? In firebug i see this:</p>

<pre><code>&lt;span );="" image1.gif="" images="" style=""&gt;&lt;/span&gt;
</code></pre>

<p>Is this a charcater escape issue? And more importantly, how do i fix this?</p>

<p>Thanks for your time!</p>
