moved emote replace back to js