Fix the vulnerability of search query dialog #5