Restructure omni services and add Chatwoot research snapshot
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
export const escapeHtml = (unsafe = '') => {
|
||||
return unsafe
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''');
|
||||
};
|
||||
|
||||
export const afterSanitizeAttributes = currentNode => {
|
||||
if ('target' in currentNode) {
|
||||
currentNode.setAttribute('target', '_blank');
|
||||
}
|
||||
};
|
||||
|
||||
export const domPurifyConfig = {
|
||||
hooks: {
|
||||
afterSanitizeAttributes,
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user