Highlighting html text


(sahlex) #1

Hi all.

I have to show highlighted fragments out of html documents in a live search
element on a web page.

How do I achieve this?

When analysing the documents, I strip_html filter the html tags out of the
indexed document but the original source still contains the tags. This is
by intention, because I don't want to lose the tags, as I want to display
the full html text when user clicks on search hit.

But when displaying the highlighted fragment, the tags should be filtered
out of the fragment, except the highlighting tags.

Please help!


(vineeth mohan) #2

I had discussed this with Shay.
Seems there is no clean way out.
I remove the tags ( partial tags too) out of the highlighted text.

Thanks
Vineeth

On Thu, Jun 28, 2012 at 12:51 PM, sahlex alex.sahler@gmx.net wrote:

Hi all.

I have to show highlighted fragments out of html documents in a live
search element on a web page.

How do I achieve this?

When analysing the documents, I strip_html filter the html tags out of the
indexed document but the original source still contains the tags. This is
by intention, because I don't want to lose the tags, as I want to display
the full html text when user clicks on search hit.

But when displaying the highlighted fragment, the tags should be
filtered out of the fragment, except the highlighting tags.

Please help!


(system) #3