What I do is use a marker for context, like __000___. Then strip it out. Here is an example:
<cfscript> function contextFix(str) { str = rereplace(str, "<.*?>","","all"); str = rereplace(str, "<.*$","","all"); // str = htmlEditFormat(str); str = replace(str, "___000___", "<span style=""background-color: yellow; "">", "all"); str = replace(str, "___999___", "</span>", "all"); str = str & "<br><br>"; return str; } </cfscript> <cfsearch collection="foo" criteria="#lCase(form.searchTerms)#" type="simple" name="mainresults" status="status" suggestions="always" contextPassages="3" contextHighlightBegin="___000___" contextHighlightEnd="___999___"> On 10/26/05, Paul Stewart <[EMAIL PROTECTED]> wrote: > Been using the new context feature in verity CF7. The problem i have is that > when verity grabs a section of text from an article to use as the output for > the context, it also grabs parts of the surrounding HTML. So that when i go > to ouput the results of a search it can totally skew the display of ther > result set. i.e. huge html tables and images appearing. > > Any way to get around this? as of now i have disabled the context ouput, > which is a shame because it look quite good otherwise. > > Paul Stewart > Site Developer > [EMAIL PROTECTED] > www.whichfranchise.com > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222341 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54