mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-27 16:54:04 +00:00
Merge pull request #2823 from chakflying/fix/footer-null
Fix: Add null check for injected HTML
This commit is contained in:
commit
6235ce6b29
1 changed files with 15 additions and 3 deletions
|
@ -502,15 +502,27 @@ export default {
|
|||
},
|
||||
|
||||
incidentHTML() {
|
||||
if (this.incident.content != null) {
|
||||
return DOMPurify.sanitize(marked(this.incident.content));
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
},
|
||||
|
||||
descriptionHTML() {
|
||||
if (this.config.description != null) {
|
||||
return DOMPurify.sanitize(marked(this.config.description));
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
},
|
||||
|
||||
footerHTML() {
|
||||
if (this.config.footerText != null) {
|
||||
return DOMPurify.sanitize(marked(this.config.footerText));
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
|
Loading…
Reference in a new issue