Fixing crashes when $ or \ appear in chat strings.