title: I'm getting double quotes inside the attributes of single quotes, How can I stop it?
body: <p>I've a variable and I stored a tag in this. I set this tag inside the double quotes and my tag has some attributes and events which are in single quotes. Now problem is that I'm getting double quotes inside the tag which were single quotes before. I want to get single quotes inside the tag of some attributes</p>
  
  <pre><code>var test= "&lt;tr&gt;&lt;td&gt;&lt;input type='text' class='demo_class' onchange='myfun(this,'val')'&gt;&lt;/td&gt;&lt;/tr&gt;"
  </code></pre>
  
  <p>It's giving me result in browser </p>
  
  <pre><code>&lt;input type="text" class="demo_class" onchange="myfun(this,"val")"&gt;
  </code></pre>
  
  <p>but I want to get </p>
  
  <pre><code>&lt;input type="text" class="demo_class" onchange="myfun(this,'val')"&gt;
  </code></pre>