InstantASP Community Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        


««12

Search Result Highlighting Problem Expand / Collapse
Author
Message
Posted 13/06/2007 08:05:12
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 29/06/2007 05:31:47
Posts: 10, Visits: 44
Cheers for the reply Tom!

Yeah, I've got the source code, and might do that. We've been carefull to use GUIDS when naming the images (We use a standalone article authoring and publishing tool rather than the wysiwig provided) but any searches including the words or partwords such as knowledge, attachments or our company name QGate result in the image urls being corrupted, so I've got to fix this problem or remove the search highlighting.

Tom

Post #12928
Posted 19/08/2007 15:56:40


Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Customers
Last Login: 27/09/2008 09:59:43
Posts: 47, Visits: 248
If you have the source and are comfortable editing and recompiling you may be interested in the following fix that seems to work for our site.

What it does is to post-process after the highlights are inserted, and remove any highlighting that is within a HTML tag.

I inserted this in utilities.vb in the function Highlight, immediately above the line  bolFirst = False

'clean up highlights within tags added by CC 07/30/07
ResultStr = Regex.Replace(ResultStr, "<([^>]*)<font style='background-color:#FFFC00;'>([^>]*)</font>([^>]*)>", "<$1$2$3>", RegexOptions.IgnoreCase)

[edit] Noting that I am using the actual highlight string. If you want to do it more elegantly see the starttag and endtag variables found in the function...

Charles

Post #13170
« Prev Topic | Next Topic »

««12

Reading This Topic Expand / Collapse
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ryan Healey, Mark Christianson, James Trott

Permissions Expand / Collapse

All times are GMT, Time now is 2:17pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.047. 9 queries. Compression Disabled.
Home | Products | Purchase | Support | Company | Contact Us
Privacy Statement | © 1999-2007 InstantASP Limited. All Rights Reserved.