mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-24 23:09:39 -05:00
Fix: Add null check for injected HTML
This commit is contained in:
parent
9ccaa4d120
commit
7c8cff7708
@ -502,15 +502,27 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
incidentHTML() {
|
incidentHTML() {
|
||||||
return DOMPurify.sanitize(marked(this.incident.content));
|
if (this.incident.content != null) {
|
||||||
|
return DOMPurify.sanitize(marked(this.incident.content));
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
descriptionHTML() {
|
descriptionHTML() {
|
||||||
return DOMPurify.sanitize(marked(this.config.description));
|
if (this.config.description != null) {
|
||||||
|
return DOMPurify.sanitize(marked(this.config.description));
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
footerHTML() {
|
footerHTML() {
|
||||||
return DOMPurify.sanitize(marked(this.config.footerText));
|
if (this.config.footerText != null) {
|
||||||
|
return DOMPurify.sanitize(marked(this.config.footerText));
|
||||||
|
} else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
Loading…
Reference in New Issue
Block a user