enhance sanitization for searching
add visibility support for student comments in the search page
refactored a bit