File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
server/ui-src/components/message Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
Notable changes to Mailpit will be documented in this file.
4
4
5
+ ## [ v1.21.4]
6
+
7
+ ### Bugfix
8
+ - Fix external CSS stylesheet loading in HTML preview ([ #388 ] ( https://github.com/axllent/mailpit/issues/388 ) )
9
+
10
+
5
11
## [ v1.21.3]
6
12
7
13
### Chore
Original file line number Diff line number Diff line change @@ -78,8 +78,9 @@ export default {
78
78
79
79
// remove bad HTML, JavaScript, iframes etc
80
80
sanitizedHTML () {
81
+ // set target & rel on all links
81
82
DOMPurify .addHook (' afterSanitizeAttributes' , (node ) => {
82
- if (node .hasAttribute (' href' ) && node .getAttribute (' href' ).substring (0 , 1 ) == ' #' ) {
83
+ if (node .tagName != ' A ' || ( node . hasAttribute (' href' ) && node .getAttribute (' href' ).substring (0 , 1 ) == ' #' ) ) {
83
84
return
84
85
}
85
86
if (' target' in node) {
@@ -115,7 +116,7 @@ export default {
115
116
' vertical-align' ,
116
117
' vlink' ,
117
118
' vspace' ,
118
- ' xml:lang'
119
+ ' xml:lang' ,
119
120
],
120
121
FORBID_ATTR : [' script' ],
121
122
}
You can’t perform that action at this time.
0 commit comments