mirror of
				https://github.com/louislam/uptime-kuma.git
				synced 2025-11-04 13:46:13 +08:00 
			
		
		
		
	Fix: Add null check for injected HTML
This commit is contained in:
		@@ -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: {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user