feat: update vue-letter and allow transform css (#10865)
Emails from iOS and MacOS clients can often come with size transformation. This results in a broken layout when sanitizing with Vue letter. This PR updates the vue-letter to include the [recent changes made there](https://github.com/mat-sz/vue-letter/pull/2). And adds the `transform` and `transform-origin` properties to the allow list Ref: https://www.caniemail.com/features/css-transform/ --------- Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script setup>
|
||||
import { computed, useTemplateRef, ref, onMounted } from 'vue';
|
||||
import { Letter } from 'vue-letter';
|
||||
import { allowedCssProperties } from 'lettersanitizer';
|
||||
|
||||
import Icon from 'next/icon/Icon.vue';
|
||||
import { EmailQuoteExtractor } from './removeReply.js';
|
||||
@@ -93,6 +94,11 @@ const hasQuotedMessage = computed(() => {
|
||||
<Letter
|
||||
v-if="showQuotedMessage"
|
||||
class-name="prose prose-bubble !max-w-none"
|
||||
:allowed-css-properties="[
|
||||
...allowedCssProperties,
|
||||
'transform',
|
||||
'transform-origin',
|
||||
]"
|
||||
:html="fullHTML"
|
||||
:text="textToShow"
|
||||
/>
|
||||
@@ -100,6 +106,11 @@ const hasQuotedMessage = computed(() => {
|
||||
v-else
|
||||
class-name="prose prose-bubble !max-w-none"
|
||||
:html="unquotedHTML"
|
||||
:allowed-css-properties="[
|
||||
...allowedCssProperties,
|
||||
'transform',
|
||||
'transform-origin',
|
||||
]"
|
||||
:text="textToShow"
|
||||
/>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user