escape raw osm usernames displayed in note comments

This commit is contained in:
Martin Raifer
2021-11-18 15:36:35 +01:00
parent 8892b437a1
commit 12f546d6e6
+6 -3
View File
@@ -53,15 +53,18 @@ export function uiNoteComments() {
.attr('href', osm.userURL(d.user))
.attr('target', '_blank');
}
selection
.html(function(d) { return d.user || t.html('note.anonymous'); });
if (d.user) {
selection.text(d.user);
} else {
selection.html(t.html('note.anonymous'));
}
});
metadataEnter
.append('div')
.attr('class', 'comment-date')
.html(function(d) {
return t('note.status.' + d.action, { when: localeDateString(d.date) });
return t.html('note.status.' + d.action, { when: localeDateString(d.date) });
});
mainEnter