Update Chat.ui.js

Fix to prevent matching malformed closing HTML tags