VERY similar to
CODEBASE-235 , but for Search History query echo'ing, rather than constraints display on search results page.
(Theoretically maybe these could be DRY'd up to use the same code generating the same HTML, just different CSS, but that was a bit tricky to do and out of scope for my needs at present. Maybe in the future).
While doing this, I also altered the HTML and string formatting for query display on the Search History page to be arguably better, it was pretty confusing and hard to read before. More work could be done here, but pretty sure this is an improvement.