mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-08 21:20:45 +08:00
Escape highlighted lines html tags
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
import type { Modification } from "@bindings/diff/Modification";
|
||||
|
||||
import File from "@app/components/File.svelte";
|
||||
import { escape } from "lodash";
|
||||
|
||||
interface Props {
|
||||
filePath: string;
|
||||
@@ -263,7 +264,7 @@
|
||||
{@html line.highlight.items
|
||||
.map(
|
||||
s =>
|
||||
`<span class="syntax ${s.style}">${s.item}</span>`,
|
||||
`<span class="syntax ${s.style}">${escape(s.item)}</span>`,
|
||||
)
|
||||
.join("")}
|
||||
{:else}
|
||||
|
||||
Reference in New Issue
Block a user