mirror of
https://github.com/home-assistant/frontend
synced 2024-09-28 00:43:28 +02:00
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:
parent
ccada33caf
commit
bb2abe4efc
@ -119,7 +119,7 @@
|
|||||||
"leaflet-draw": "1.0.4",
|
"leaflet-draw": "1.0.4",
|
||||||
"lit": "2.8.0",
|
"lit": "2.8.0",
|
||||||
"luxon": "3.4.4",
|
"luxon": "3.4.4",
|
||||||
"marked": "10.0.0",
|
"marked": "11.0.0",
|
||||||
"memoize-one": "6.0.0",
|
"memoize-one": "6.0.0",
|
||||||
"node-vibrant": "3.2.1-alpha.1",
|
"node-vibrant": "3.2.1-alpha.1",
|
||||||
"proxy-polyfill": "0.3.2",
|
"proxy-polyfill": "0.3.2",
|
||||||
|
@ -27,14 +27,14 @@ const onTagAttr = (
|
|||||||
return undefined;
|
return undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
const renderMarkdown = (
|
const renderMarkdown = async (
|
||||||
content: string,
|
content: string,
|
||||||
markedOptions: MarkedOptions,
|
markedOptions: MarkedOptions,
|
||||||
hassOptions: {
|
hassOptions: {
|
||||||
// Do not allow SVG on untrusted content, it allows XSS.
|
// Do not allow SVG on untrusted content, it allows XSS.
|
||||||
allowSvg?: boolean;
|
allowSvg?: boolean;
|
||||||
} = {}
|
} = {}
|
||||||
): string => {
|
): Promise<string> => {
|
||||||
if (!whiteListNormal) {
|
if (!whiteListNormal) {
|
||||||
whiteListNormal = {
|
whiteListNormal = {
|
||||||
...getDefaultWhiteList(),
|
...getDefaultWhiteList(),
|
||||||
@ -61,7 +61,7 @@ const renderMarkdown = (
|
|||||||
whiteList = whiteListNormal;
|
whiteList = whiteListNormal;
|
||||||
}
|
}
|
||||||
|
|
||||||
return filterXSS(marked(content, markedOptions), {
|
return filterXSS(await marked(content, markedOptions), {
|
||||||
whiteList,
|
whiteList,
|
||||||
onTagAttr,
|
onTagAttr,
|
||||||
});
|
});
|
||||||
|
10
yarn.lock
10
yarn.lock
@ -9749,7 +9749,7 @@ __metadata:
|
|||||||
luxon: "npm:3.4.4"
|
luxon: "npm:3.4.4"
|
||||||
magic-string: "npm:0.30.5"
|
magic-string: "npm:0.30.5"
|
||||||
map-stream: "npm:0.0.7"
|
map-stream: "npm:0.0.7"
|
||||||
marked: "npm:10.0.0"
|
marked: "npm:11.0.0"
|
||||||
memoize-one: "npm:6.0.0"
|
memoize-one: "npm:6.0.0"
|
||||||
mocha: "npm:10.2.0"
|
mocha: "npm:10.2.0"
|
||||||
node-vibrant: "npm:3.2.1-alpha.1"
|
node-vibrant: "npm:3.2.1-alpha.1"
|
||||||
@ -11740,12 +11740,12 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"marked@npm:10.0.0":
|
"marked@npm:11.0.0":
|
||||||
version: 10.0.0
|
version: 11.0.0
|
||||||
resolution: "marked@npm:10.0.0"
|
resolution: "marked@npm:11.0.0"
|
||||||
bin:
|
bin:
|
||||||
marked: bin/marked.js
|
marked: bin/marked.js
|
||||||
checksum: f7442f6bd6a678e48eb3ca2f4b15e6d80ce63fa8363d319733ad7d968cfea410eacd01e764dc76c59d7ff77d409007bf5628d215ec84ef4ffa65f44ae08f0255
|
checksum: bc533791a77a041291a92f91083482a95d59767c4adaf39c4aa3008400446e586933578065ceb4c66c340aed0fb13a61b489d7d88adfbecda7c8ed7bfcead102
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user