This content has been marked as final. Show 4 replies
I strip the html/tags when indexing the collection so no need to do anything on output of results. You could do it on result display as well. I use a regex to remove tags. You could probably simplify the regex.
Actually this will work fine to strip tags:
Another comment - if your content is very large and valid XML (XHTML) then you will get better performance using XSLT to convert to plain text. Regex, especially with global replacement "all" get slower as the content gets longer.
don;t forget to account for the fact that the returned snippet of
content can end in the middle of an html tag, so that the tag will not
be a full tag, i.e. the content may well end with ...<a href="somepa
the best thing to do is strip html tags when you index the collection,
not at output.