mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 10:10:30 +08:00
Revert HTML tag escaping
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
This commit is contained in:
@@ -2,14 +2,13 @@
|
||||
import dompurify from "dompurify";
|
||||
import { marked } from "marked";
|
||||
|
||||
import { renderer, walkTokens } from "@app/lib/markdown";
|
||||
import { renderer } from "@app/lib/markdown";
|
||||
import { twemoji } from "@app/lib/utils";
|
||||
|
||||
export let content: string;
|
||||
export let fontSize: "tiny" | "small" | "medium" = "small";
|
||||
|
||||
marked.use({
|
||||
walkTokens,
|
||||
renderer,
|
||||
// TODO: Disables deprecated options, remove once removed from marked
|
||||
mangle: false,
|
||||
@@ -17,8 +16,7 @@
|
||||
});
|
||||
|
||||
const render = (content: string): string =>
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
dompurify.sanitize(marked.parseInline(content), { SANITIZE_DOM: false });
|
||||
dompurify.sanitize(marked.parseInline(content));
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
import {
|
||||
markdownExtensions as extensions,
|
||||
renderer,
|
||||
walkTokens,
|
||||
} from "@app/lib/markdown";
|
||||
import { updateProjectRoute } from "@app/views/projects/router";
|
||||
|
||||
@@ -27,7 +26,6 @@
|
||||
);
|
||||
marked.use({
|
||||
extensions,
|
||||
walkTokens,
|
||||
renderer,
|
||||
// TODO: Disables deprecated options, remove once removed from marked
|
||||
mangle: false,
|
||||
@@ -37,8 +35,7 @@
|
||||
let container: HTMLElement;
|
||||
|
||||
const render = (content: string): string =>
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
dompurify.sanitize(marked.parse(content), { SANITIZE_DOM: false });
|
||||
dompurify.sanitize(marked.parse(content));
|
||||
|
||||
function navigateToMarkdownLink(event: any) {
|
||||
if (event.target.matches(".file-link")) {
|
||||
|
||||
Reference in New Issue
Block a user