forked from Rockachopa/Timmy-time-dashboard
fix: sanitize dynamic innerHTML in templates (#47)
This commit is contained in:
@@ -327,7 +327,11 @@
|
||||
.then(function(data) {
|
||||
var list = document.getElementById('notif-list');
|
||||
if (!data.length) {
|
||||
list.innerHTML = '<div class="mc-notif-empty">No recent notifications</div>';
|
||||
list.innerHTML = '';
|
||||
var emptyDiv = document.createElement('div');
|
||||
emptyDiv.className = 'mc-notif-empty';
|
||||
emptyDiv.textContent = 'No recent notifications';
|
||||
list.appendChild(emptyDiv);
|
||||
return;
|
||||
}
|
||||
list.innerHTML = '';
|
||||
|
||||
Reference in New Issue
Block a user