Skip to content

Commit

Permalink
fix(ui): remove html from summary before display
Browse files Browse the repository at this point in the history
  • Loading branch information
whitdog47 committed Dec 19, 2024
1 parent aacdbbb commit e5ebdb5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
import { mapFields } from "vuex-map-fields"
import { formatToUTC, formatToTimeZones } from "@/filters"
import { mapActions } from "vuex"
import DOMPurify from "dompurify"
export default {
name: "IncidentTimelineReportTab",
Expand All @@ -93,7 +94,7 @@ export default {
},
incidentSummary() {
return this.summary
return DOMPurify.sanitize(this.summary, { ALLOWED_TAGS: [] })
.split("\n")
.map((part) => `<p >${part}</p>`)
.join("")
Expand Down

0 comments on commit e5ebdb5

Please sign in to comment.