From a27ce8310e5f181fe0d43a2a24c35e530f70aafa Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 11:49:03 +0000 Subject: [PATCH 1/2] chore(deps): update dependency marked to v14 --- frontend/package.json | 2 +- package-lock.json | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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/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" From 1ce9e67f77f5bb06952701302513b39a38c08e61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Fern=C3=A1ndez?= Date: Fri, 9 Aug 2024 14:06:53 +0200 Subject: [PATCH 2/2] chore: remove unnecessary type casting in html.ts After the update of marked to v14, the returned type corresponds to the passed ``async`` option, so the casting is no longer necessary. --- frontend/src/utils/html.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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,