Radish alpha
r
Radicle desktop app
Radicle
Git (anonymous pull)
Log in to clone via SSH
Escape highlighted lines html tags
Sebastian Martinez committed 1 year ago
commit 3276e5f7b5cb5d91def104bfbf7594548e17b05f
parent 4647cea062b2fd9b8e6a12d4ea561508af1e080b
1 file changed +2 -1
modified src/components/Changeset/FileDiff.svelte
@@ -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}