web/timeline: add vertical align for custom emojis

This commit is contained in:
Tulir Asokan 2024-10-10 21:36:54 +03:00
parent 63268a0ccb
commit 543c3bcc25
2 changed files with 5 additions and 1 deletions

View file

@ -10,3 +10,7 @@ div.media-container {
max-height: 100%;
}
}
img[data-mx-emoticon] {
vertical-align: middle;
}

View file

@ -188,7 +188,7 @@ export const sanitizeHtmlParams: sanitizeHtml.IOptions = {
// eslint-disable-next-line id-length
a: ["href", "name", "target", "rel"], // remote target: custom to matrix
// img tags also accept width/height, we just map those to max-width & max-height during transformation
img: ["src", "alt", "title", "style"],
img: ["src", "alt", "title", "style", "data-mx-emoticon"],
ol: ["start"],
code: ["class"], // We don't actually allow all classes, we filter them in transformTags
},