Trim the keyword before submitting it.