Adding special character checking to the beginning and end of the string, for emoticons