title: Why does replacement work in first line only
body: <p>Why does the jquery replacment work in first line only?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var el = $('#X');
  el.html(el.html().replace("&amp;", "%26"));</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  
  Line 1: &lt;span id="X"&gt;&lt;a href="http://www.www.com/test&amp;test1"&gt;&lt;/a&gt;&lt;/span&gt;
  Line 2: &lt;span id="X"&gt;&lt;a href="http://www.www.com/test&amp;test2"&gt;&lt;/a&gt;&lt;/span&gt;</code></pre>
  </div>
  </div>
  </p>