feat: Improve email rendering, introduce a new layout for emails (#5039)

Co-authored-by: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com>
This commit is contained in:
Pranav Raj S
2022-08-01 10:53:50 +05:30
committed by GitHub
parent ef9ea99b91
commit 2c372fe315
19 changed files with 282 additions and 71 deletions

View File

@@ -1,5 +1,4 @@
import MessageFormatter from '../helpers/MessageFormatter';
import DOMPurify from 'dompurify';
export default {
methods: {
@@ -22,25 +21,5 @@ export default {
return `${description.slice(0, 97)}...`;
},
stripStyleCharacters(message) {
return DOMPurify.sanitize(message, {
FORBID_TAGS: ['style'],
FORBID_ATTR: [
'id',
'class',
'style',
'bgcolor',
'valign',
'width',
'face',
'color',
'height',
'lang',
'align',
'size',
'border',
],
});
},
},
};