Could you consider implementing not only the replacement, but also the search and highlight functionality in the sidebar?
Yes, I am aware of the proposed solution in #353, and if this is needed only for one-time use — yes, that's ok, but if you need to use it more than once, it becomes way more inconvenient and tiring: first, you need to replace the search text with something like <span class=foxreplace style="background-color:yellow">$&</span>, then in the "HTML input&output" mode search for <span class=foxreplace style="background-color:yellow">(highlighted text)</span> and replace it with $1, and all of this has to be done manually. Also, as I and some other users have reported, using the "HTML input&output" mode interferes with the operation of some extensions and user scripts.