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