diff --git a/frontend/package.json b/frontend/package.json index 982e5ae279a..35c8ada6953 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -37,7 +37,7 @@ "hls.js": "1.5.13", "jassub": "1.7.15", "lodash-es": "4.17.21", - "marked": "13.0.2", + "marked": "14.0.0", "sortablejs": "1.15.2", "swiper": "11.1.4", "uuid": "10.0.0", diff --git a/frontend/src/utils/html.ts b/frontend/src/utils/html.ts index df661550497..3e2c1a01966 100644 --- a/frontend/src/utils/html.ts +++ b/frontend/src/utils/html.ts @@ -13,7 +13,7 @@ import { parse } from 'marked'; export function sanitizeHtml(input: string, isMarkdown = false): string { // Some providers have newlines, replace them with the proper tag. const cleanString = input.replaceAll(/\r\n|\r|\n/g, '
'); - const inputString = isMarkdown ? (parse(cleanString, { async: false }) as string) : cleanString; + const inputString = isMarkdown ? parse(cleanString, { async: false }) : cleanString; return DOMPurify.sanitize( inputString, diff --git a/package-lock.json b/package-lock.json index f095fd1edf7..3324a2771d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ "hls.js": "1.5.13", "jassub": "1.7.15", "lodash-es": "4.17.21", - "marked": "13.0.2", + "marked": "14.0.0", "sortablejs": "1.15.2", "swiper": "11.1.4", "uuid": "10.0.0", @@ -8216,9 +8216,9 @@ } }, "node_modules/marked": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/marked/-/marked-13.0.2.tgz", - "integrity": "sha512-J6CPjP8pS5sgrRqxVRvkCIkZ6MFdRIjDkwUwgJ9nL2fbmM6qGQeB2C16hi8Cc9BOzj6xXzy0jyi0iPIfnMHYzA==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-14.0.0.tgz", + "integrity": "sha512-uIj4+faQ+MgHgwUW1l2PsPglZLOLOT1uErt06dAPtx2kjteLAkbsd/0FiYg/MGS+i7ZKLb7w2WClxHkzOOuryQ==", "license": "MIT", "bin": { "marked": "bin/marked.js"