title: using fn:replace and escaping special characters in jstl
body: <p>I've got a string of html code with some additional tags inside.  I need to get rid of the additional tags, but can't use fn:escapeXML because that would make the string no longer usable as html.</p>
  
  <p>Example:
  The value of "newLink" is set as: </p>
  
  <p><code>&lt;a href="This is a &lt;span class="help"&gt;test&lt;/span&gt;"&gt;This is a &lt;span class="help"&gt;test&lt;/span&gt;&lt;/a&gt;</code></p>
  
  <p>How can I use fn:replace (or some other jstl coding) to get rid of the inner tags?</p>
  
  <p>This is what I've managed so far.  Unfortunately, the last doesn't seem to match the empty tags.</p>
  
  <p><code>&lt;c:set var="displayValue"&gt;${fn:replace(pnxItem, 'span class=\"searchword\"', '')}&lt;/c:set&gt;
  &lt;c:set var="displayValue"&gt;${fn:replace(displayValue, '/span', '')}&lt;/c:set&gt;
  &lt;c:set var="displayValue"&gt;${fn:replace(displayValue, '&amp;gt;&lt;', '')}&lt;/c:set&gt;
  &lt;c:set var="displayValue"&gt;${fn:replace(displayValue, '&lt;&gt;', '')}&lt;/c:set&gt;</code></p>