I have an autocomplete form and when showing the results matching the user\'s search string, I want to highlight the search string itself. I plan to do this by wrapping any
Parse the HTML and find all text nodes in it, doing the replace in all of them. If you are using jQuery you can do this by just passing the snippet to $() which parses it in a Document Fragment, which you can then query or step over all elements and find all the .text() to replace.