add a function that uses replace() to replace all instances of '<' and '>' with the HTML entities and use this wherever the query text is added onto the page.
add a function that uses replace() to replace all instances of '<' and '>' with the HTML entities and use this wherever the query text is added onto the page.