Full text search in HTML ignoring tags / &

I've recently seen a lot of libraries for searching and highlighting terms within an HTML page. However, every library I saw has the same problem, they can't find text partly encased in an html tag and/or they'd fail at finding special characters which are &-expressed.


Example a:

<span> This is a test. This is a <b>test</b> too</span>

Searching for "a test" would find the first instance but not the second.


Example b:

<span> Pencils in spanish are called l&aacute;pices</span>

Searching for "lápices" or "lapices" would fail to produce a result.


Is there a JS library that does this or at least a way to circumvent these obstacles?

Thanks in Advance!

Bruno

15
задан Bruno 4 May 2011 в 16:43
поделиться