Skip to content

Commit

Permalink
fix: Исправление импорта DOMPurify
Browse files Browse the repository at this point in the history
  • Loading branch information
ExEr7um committed Oct 21, 2023
1 parent ab38d36 commit 009f722
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runtime/composables/useSanitize.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { sanitize } from "isomorphic-dompurify"
import DOMPurify from "isomorphic-dompurify"

/**
* Данная функция нужна для очистки HTML-кода, полученного от API.
Expand All @@ -11,5 +11,5 @@ import { sanitize } from "isomorphic-dompurify"
*/
export default function (html: string | undefined) {
// Возвращаем очищенный HTML-код
return sanitize(html ?? "", { USE_PROFILES: { html: true } })
return DOMPurify.sanitize(html ?? "", { USE_PROFILES: { html: true } })
}

0 comments on commit 009f722

Please sign in to comment.