Parse and replace text for #hashtags and @mentions