Create a link with javascript within it
<p>so I am trying to create a link within my page but for some reason it is getting disjointed the code is </p>

<pre><code>data = data + "&lt;li&gt;&lt;a href='#' onclick='History.pushState({state:null},'article,"+rtndata[j].id+"','article'); return false;'&gt;" + rtndata[j].title + "&lt;/a&gt;&lt;/li&gt;";
</code></pre>

<p>rtndata[j].id is an id number and rtndata[j].title is a title both are being pulled from a db but when it renders in the browser it becomes</p>

<pre><code>&lt;a false;'="" return="" article,41','article');="" onclick="History.pushState({state:null}," href="#"&gt;Newsflash 5&lt;/a&gt;
</code></pre>

<p>so what I to render is actually</p>

<pre><code>&lt;a href="#" onclick="History.pushState({state:null},'article,41','article'); return false;'&gt;"Newsflash 5&lt;/a&gt;;
</code></pre>

<p>Can anyone help me?</p>
