Convert to string before replace (#186)
This fixes this error text.replace is not a function When somebody has this nickname 1234567890 it thorws error in the server viewer.
This commit is contained in:
@@ -124,7 +124,7 @@ function escapeHtml(text) {
|
||||
"'": '''
|
||||
};
|
||||
|
||||
return text.replace(/[&<>"']/g, function(m) { return map[m]; });
|
||||
return text.toString().replace(/[&<>"']/g, function(m) { return map[m]; });
|
||||
}
|
||||
|
||||
function updateTooltip(el, text) {
|
||||
|
Reference in New Issue
Block a user