Skip to content

Commit

Permalink
Merge branch 'release/v1.21.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
axllent committed Nov 17, 2024
2 parents b698e03 + a33d0c9 commit 6d115ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

Notable changes to Mailpit will be documented in this file.

## [v1.21.4]

### Bugfix
- Fix external CSS stylesheet loading in HTML preview ([#388](https://github.com/axllent/mailpit/issues/388))


## [v1.21.3]

### Chore
Expand Down
5 changes: 3 additions & 2 deletions server/ui-src/components/message/Message.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ export default {
// remove bad HTML, JavaScript, iframes etc
sanitizedHTML() {
// set target & rel on all links
DOMPurify.addHook('afterSanitizeAttributes', (node) => {
if (node.hasAttribute('href') && node.getAttribute('href').substring(0, 1) == '#') {
if (node.tagName != 'A' || (node.hasAttribute('href') && node.getAttribute('href').substring(0, 1) == '#')) {
return
}
if ('target' in node) {
Expand Down Expand Up @@ -115,7 +116,7 @@ export default {
'vertical-align',
'vlink',
'vspace',
'xml:lang'
'xml:lang',
],
FORBID_ATTR: ['script'],
}
Expand Down

0 comments on commit 6d115ce

Please sign in to comment.