move sanitize_string to utils
add case-insensitive simple search api
bug fix for chat edit template

user should always be an object