Is this inside your browser? Could be you've got a malware browser extension / plugin. Is it outside your browser? Could be some kind of native malware.

Do you use Steam? Is this what Steam chats look like? Could be some kind of Steam-related issue.