Chore: Contact Sidebar, conversation cleanup (#908)
- Update sidebar design - Move every contact data to contacts module - Revert go to next conversation feature - Fix issues with new conversation in action cable - Escape HTML content - Broadcast event when conversation.contact changes. Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
8
app/javascript/shared/helpers/HTMLSanitizer.js
Normal file
8
app/javascript/shared/helpers/HTMLSanitizer.js
Normal file
@@ -0,0 +1,8 @@
|
||||
export const escapeHtml = (unsafe = '') => {
|
||||
return unsafe
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''');
|
||||
};
|
||||
Reference in New Issue
Block a user