fix missing librairies

This commit is contained in:
Julien Fastré 2024-04-10 16:08:09 +02:00
parent 3df57c1569
commit 680513a3a6
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
2 changed files with 6 additions and 3 deletions

View File

@ -14,12 +14,15 @@
"@ckeditor/ckeditor5-vue": "^4.0.1", "@ckeditor/ckeditor5-vue": "^4.0.1",
"@symfony/webpack-encore": "^4.1.0", "@symfony/webpack-encore": "^4.1.0",
"@tsconfig/node14": "^1.0.1", "@tsconfig/node14": "^1.0.1",
"@types/dompurify": "^3.0.5",
"bindings": "^1.5.0", "bindings": "^1.5.0",
"bootstrap": "5.2.3", "bootstrap": "5.2.3",
"chokidar": "^3.5.1", "chokidar": "^3.5.1",
"dompurify": "^3.1.0",
"fork-awesome": "^1.1.7", "fork-awesome": "^1.1.7",
"jquery": "^3.6.0", "jquery": "^3.6.0",
"node-sass": "^8.0.0", "node-sass": "^8.0.0",
"marked": "^12.0.1",
"popper.js": "^1.16.1", "popper.js": "^1.16.1",
"postcss-loader": "^7.0.2", "postcss-loader": "^7.0.2",
"raw-loader": "^4.0.2", "raw-loader": "^4.0.2",
@ -46,7 +49,7 @@
"es6-promise": "^4.2.8", "es6-promise": "^4.2.8",
"leaflet": "^1.7.1", "leaflet": "^1.7.1",
"masonry-layout": "^4.2.2", "masonry-layout": "^4.2.2",
"mime": "^3.0.0", "mime": "^4.0.0",
"swagger-ui": "^4.15.5", "swagger-ui": "^4.15.5",
"vis-network": "^9.1.0", "vis-network": "^9.1.0",
"vue": "^3.2.37", "vue": "^3.2.37",

View File

@ -125,7 +125,7 @@ const preprocess = (markdown: string): string => {
} }
const postprocess = (html: string): string => { const postprocess = (html: string): string => {
DOMPurify.addHook('afterSanitizeAttributes', (node) => { DOMPurify.addHook('afterSanitizeAttributes', (node: any) => {
if ('target' in node) { if ('target' in node) {
node.setAttribute('target', '_blank'); node.setAttribute('target', '_blank');
node.setAttribute('rel', 'noopener noreferrer'); node.setAttribute('rel', 'noopener noreferrer');
@ -140,7 +140,7 @@ const postprocess = (html: string): string => {
const convertMarkdownToHtml = (markdown: string): string => { const convertMarkdownToHtml = (markdown: string): string => {
marked.use({'hooks': {postprocess, preprocess}}); marked.use({'hooks': {postprocess, preprocess}});
const rawHtml = marked(markdown); const rawHtml = marked(markdown) as string;
return rawHtml; return rawHtml;
}; };