mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 10:10:30 +08:00
Update Vite to 3.0
- Replaces `sanitize-html` with `xss` due to Node core modules dependencies - Remove empty style tag from SeedDropdown - Update devServer ports - Replace vite-plugin-rewrite-all - Add node events polyfill Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
This commit is contained in:
+7
-11
@@ -4,7 +4,7 @@
|
||||
import matter from "@radicle/gray-matter";
|
||||
import type * as proj from "@app/project";
|
||||
import { getImageMime } from "@app/utils";
|
||||
import sanitizeHtml from "sanitize-html";
|
||||
import xss, { getDefaultWhiteList } from "xss";
|
||||
|
||||
export let content: string;
|
||||
export let getImage: (path: string) => Promise<proj.Blob>;
|
||||
@@ -15,18 +15,14 @@
|
||||
let container: HTMLElement;
|
||||
|
||||
const render = (content: string): string => {
|
||||
return sanitizeHtml(marked.parse(content), {
|
||||
allowedTags: sanitizeHtml.defaults.allowedTags.concat([
|
||||
"img",
|
||||
"audio",
|
||||
"video",
|
||||
]),
|
||||
allowedAttributes: {
|
||||
...sanitizeHtml.defaults.allowedAttributes,
|
||||
video: ["src"],
|
||||
return xss(marked.parse(content), {
|
||||
whiteList: {
|
||||
...getDefaultWhiteList(),
|
||||
img: ["src"],
|
||||
audio: ["src"],
|
||||
video: ["src"]
|
||||
},
|
||||
disallowedTagsMode: "escape",
|
||||
stripIgnoreTag: false,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -20,9 +20,6 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
{#await formatSeeds() then items}
|
||||
<Dropdown
|
||||
{items}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
// This shim is used as a stand-in for the node "events" library, used by
|
||||
// the "keccack" package depended on by @gnosis.pm/safe-core-sdk.
|
||||
import events from 'events';
|
||||
|
||||
export default events;
|
||||
Reference in New Issue
Block a user