title: Internet Explorer XML Parsing wrong at hypens and can't make repro example
body: <p>I am debugging the following code of a bigger system which is not written by me. There is XML coming from a server via AJAX which is not parsed properly. The following explains the problem.</p>
  
  <p>Note the hyphens - internet explorer is inserting them if there is one in a CDATA part.</p>
  
  <p><a href="https://i.stack.imgur.com/fAw6X.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fAw6X.png" alt="enter image description here"></a></p>
  
  <p>When I print for example</p>
  
  <pre><code>console.log(a.item(4).childNodes.item(0));
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>`{"INCD":"30362790021","sycd":"BKJ2` 
  </code></pre>
  
  <p>To debug the problem, I try to create a minimal example.</p>
  
  <p>I have copied the variable <code>source</code> (by setting a breakpoint with the condition .ocmmand == 'List_detail') to a simple HTML Javascript file as follows:</p>
  
  <pre><code>&lt;script&gt;
  
      var source = "&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\n&lt;!DOCTYPE primrose SYSTEM \"dtd/primrose.dtd\"&gt;\n&lt;primrose&gt;&lt;array type=\"string\"&gt; .... &lt;/primrose&gt;";
  
      var xml = new DOMParser().parseFromString(source, 'text/xml');
      var a = xml.documentElement.childNodes;
      console.log(a);
      console.log(a.item(4).childNodes.item(0));
  &lt;/script&gt;
  </code></pre>
  
  <p>The example in full length is at <a href="http://pastebin.com/GaHdjiWW" rel="nofollow noreferrer">http://pastebin.com/GaHdjiWW</a></p>
  
  <p>But this seems to work just fine:</p>
  
  <p><a href="https://i.stack.imgur.com/1Lgfw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1Lgfw.png" alt="enter image description here"></a></p>
  
  <p>When I run <code>console.log(a.item(4).childNodes.item(0));</code> I get</p>
  
  <p><code>{"INCD":"30362790021","sycd":"BKJ2-2","type_code":"00000050555","type_name":"BKJ","series_code":"110302280810","web_product_id":"10302280810","series_name":"Cross Recessed Pan Head Screws","disp_brandName":"MISUMI","brd_code":"MSM1","ecal_brd_code":"MSM","main_photo":"MSM1/PHOTO/10302280810.jpg","catch_copy":null,"cad_2d":"1","cad_2d_type":"1","cad_3d":"1","cad_3d_type":"2","scene7_img_product":[{"img_fileName":"110302280810_20149999_m_01_99999_jp","img_description":""}],"ary_displayLink":null,"ary_param_verify":"BKJ{2}\t{2}","ary_param_disp":"BKJ{2}\t{2}","param_conv_bef":null,"param_conv_bef_disp":null,"canOrder":"1"}</code></p>
  
  <p>and so on...</p>
  
  <p>Internet Explorer Version is 11.0.9600.18314</p>
  
  <p>I do know <a href="https://stackoverflow.com/questions/22039982/ie10-11-cdata-with-hyphens-parsed-wrong">IE10, 11 CDATA with hyphens parsed wrong</a> and it somehow seems to be a bug in IE. But why can I not reproduce it in the same browser?</p>