mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-08-31 15:43:25 +00:00
support html img in wpt desc
This commit is contained in:
@@ -24,13 +24,13 @@
|
||||
if (text === undefined) {
|
||||
return '';
|
||||
}
|
||||
let sanitized = sanitizeHtml(text, {
|
||||
allowedTags: ['a', 'br'],
|
||||
return sanitizeHtml(text, {
|
||||
allowedTags: ['a', 'br', 'img'],
|
||||
allowedAttributes: {
|
||||
a: ['href', 'target']
|
||||
a: ['href', 'target'],
|
||||
img: ['src']
|
||||
}
|
||||
}).trim();
|
||||
return sanitized;
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -102,4 +102,9 @@
|
||||
@apply text-blue-500 dark:text-blue-300;
|
||||
@apply hover:underline;
|
||||
}
|
||||
|
||||
div :global(img) {
|
||||
@apply my-0;
|
||||
@apply rounded-md;
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user