encode emoji strings pre-socket message
client side js cleanup