title: jQuery replace span content by string
body: <p>I have a string containing html markup in following format:</p>
  
  <pre><code>&lt;p&gt;
    &lt;span class="xyz-display"&gt;
      &lt;lots of other contents&gt;
    &lt;/span&gt;
  &lt;/p&gt;
  </code></pre>
  
  <p>I need to replace everything inside <code>&lt;span class="xyz-display"&gt;</code> by a string before running sanitation on the string. So it looks like below:</p>
  
  <pre><code>&lt;p&gt;
    &lt;span class="xyz-display"&gt;
      abc
    &lt;/span&gt;
  &lt;/p&gt;
  </code></pre>
  
  <p>After this I need to replace <code>abc</code> by the original content <code>&lt;lots of other contents&gt;</code> back. How can I achieve this using jQuery?</p>
  
  <p>Thanks and Regards </p>