Skip to content

Commit 6d115ce

Browse files
committed
Merge branch 'release/v1.21.4'
2 parents b698e03 + a33d0c9 commit 6d115ce

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
Notable changes to Mailpit will be documented in this file.
44

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+
511
## [v1.21.3]
612

713
### Chore

server/ui-src/components/message/Message.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ export default {
7878
7979
// remove bad HTML, JavaScript, iframes etc
8080
sanitizedHTML() {
81+
// set target & rel on all links
8182
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) == '#')) {
8384
return
8485
}
8586
if ('target' in node) {
@@ -115,7 +116,7 @@ export default {
115116
'vertical-align',
116117
'vlink',
117118
'vspace',
118-
'xml:lang'
119+
'xml:lang',
119120
],
120121
FORBID_ATTR: ['script'],
121122
}

0 commit comments

Comments
 (0)