Update dependency marked to v11 (#18860)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
renovate[bot] 2023-12-04 13:11:51 +00:00 committed by GitHub
parent ccada33caf
commit bb2abe4efc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 deletions

View File

@ -119,7 +119,7 @@
"leaflet-draw": "1.0.4",
"lit": "2.8.0",
"luxon": "3.4.4",
"marked": "10.0.0",
"marked": "11.0.0",
"memoize-one": "6.0.0",
"node-vibrant": "3.2.1-alpha.1",
"proxy-polyfill": "0.3.2",

View File

@ -27,14 +27,14 @@ const onTagAttr = (
return undefined;
};
const renderMarkdown = (
const renderMarkdown = async (
content: string,
markedOptions: MarkedOptions,
hassOptions: {
// Do not allow SVG on untrusted content, it allows XSS.
allowSvg?: boolean;
} = {}
): string => {
): Promise<string> => {
if (!whiteListNormal) {
whiteListNormal = {
...getDefaultWhiteList(),
@ -61,7 +61,7 @@ const renderMarkdown = (
whiteList = whiteListNormal;
}
return filterXSS(marked(content, markedOptions), {
return filterXSS(await marked(content, markedOptions), {
whiteList,
onTagAttr,
});

View File

@ -9749,7 +9749,7 @@ __metadata:
luxon: "npm:3.4.4"
magic-string: "npm:0.30.5"
map-stream: "npm:0.0.7"
marked: "npm:10.0.0"
marked: "npm:11.0.0"
memoize-one: "npm:6.0.0"
mocha: "npm:10.2.0"
node-vibrant: "npm:3.2.1-alpha.1"
@ -11740,12 +11740,12 @@ __metadata:
languageName: node
linkType: hard
"marked@npm:10.0.0":
version: 10.0.0
resolution: "marked@npm:10.0.0"
"marked@npm:11.0.0":
version: 11.0.0
resolution: "marked@npm:11.0.0"
bin:
marked: bin/marked.js
checksum: f7442f6bd6a678e48eb3ca2f4b15e6d80ce63fa8363d319733ad7d968cfea410eacd01e764dc76c59d7ff77d409007bf5628d215ec84ef4ffa65f44ae08f0255
checksum: bc533791a77a041291a92f91083482a95d59767c4adaf39c4aa3008400446e586933578065ceb4c66c340aed0fb13a61b489d7d88adfbecda7c8ed7bfcead102
languageName: node
linkType: hard