File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import * as Notifications from "../elements/notifications";
44import { format } from "date-fns/format" ;
55import AnimatedModal , { ShowOptions } from "../utils/animated-modal" ;
66import { Quote } from "@monkeytype/schemas/quotes" ;
7+ import { escapeHTML } from "../utils/misc" ;
78
89let quotes : Quote [ ] = [ ] ;
910
@@ -12,10 +13,10 @@ function updateList(): void {
1213 quotes . forEach ( ( quote , index ) => {
1314 const quoteEl = $ ( `
1415 <div class="quote" data-id="${ index } " data-db-id="${ quote . _id } ">
15- <textarea class="text">${ quote . text } </textarea>
16- <input type="text" class="source" placeholder="Source" value="${
17- quote . source
18- } ">
16+ <textarea class="text">${ escapeHTML ( quote . text ) } </textarea>
17+ <input type="text" class="source" placeholder="Source" value="${ escapeHTML (
18+ quote . source ,
19+ ) } ">
1920 <div class="buttons">
2021 <button disabled class="textButton undo" aria-label="Undo changes" data-balloon-pos="left"><i class="fas fa-fw fa-undo-alt"></i></button>
2122 <button class="textButton refuse" aria-label="Refuse quote" data-balloon-pos="left"><i class="fas fa-fw fa-times"></i></button>
You can’t perform that action at this time.
0 commit comments