Added trim function to addHashtags and addBookmark methods.