Now uses JQuery to find index of to-be-highlighted text within HTML document.
Adds HTML escaping for all user input.