title: \u200b (Zero width space) characters in my JS code. Where did they come from?
body: <p>I am developing a front end of a web app using NetBeans IDE 7.0.1. Recently I had a very nasty bug, which I finally fixed.</p>
  
  <p>Say I have code</p>
  
  <pre><code>var element = '&lt;input size="3" id="foo" name="elements[foo][0]" /&gt;';
  $('#bar').append(element);
  </code></pre>
  
  <p>I noticed that something gone wrong when I saw that <code>size</code> attribute doesn't work in Chrome (didn't checked in other browsers). When I opened that element in Inspector, it was interpreted as something like</p>
  
  <pre><code>&lt;input id="&amp;quot;3&amp;quot;" name="&amp;quot;elements[foo][0]&amp;quot;" 
      size="&amp;quot;foo&amp;quot;" /&gt;
  </code></pre>
  
  <p>Which was rather strange. After manually retyping the <code>element</code> string character-in-character, the bug was gone. When I undo'ed that change I noticed that Netbeans alerted me about some Unicode characters in my old code. It was <code>\u200b</code> - a zero width spaces after each '=', between '][' and in the end of the string. So the string appeared normal because zero width spaces wasn't displayed, but after escaping them my string was</p>
  
  <pre><code>'&lt;input size=\u200b"3" id=\u200b"foo" name=\u200b"elements[foo]\u200b[0]" /&gt;\u200b'
  </code></pre>
  
  <p>Now where the hell did I get them?</p>
  
  <p>I'm not sure where did I copied the code of <code>element</code> from, but it's definitely one of the following:</p>
  
  <ul>
  <li>Other pane of Netbeans Editor with HTML template file;</li>
  <li>Google Chrome Inspector, 'Copy as HTML' action;</li>
  <li>Google Chrome source view page (very doubtfully).</li>
  </ul>
  
  <p>But I can't reproduce the bug with neither of that.</p>
  
  <p>I use Netbeans 7.0.1 and Google Chrome 13.0 under Windows 7. No keyboard switchers or anything like it is running. Also I'm using Git for version control, but I didn't pulled that code, so it is very unlikely that Git is to blame. It can't be a stupid joke of my colleagues, because they are quite well-mannered.</p>
  
  <p>Any suggestions who messed up my code?</p>