1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Sanitize unknown node type when displaying

This commit is contained in:
Nick O'Leary 2020-09-21 14:00:01 +01:00
parent 70b6674f44
commit 7cb499cde9
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -960,7 +960,11 @@ RED.nodes = (function() {
} }
if (!isInitialLoad && unknownTypes.length > 0) { if (!isInitialLoad && unknownTypes.length > 0) {
var typeList = "<ul><li>"+unknownTypes.join("</li><li>")+"</li></ul>"; var typeList = $("<ul>");
unknownTypes.forEach(function(t) {
$("<li>").text(t).appendTo(typeList);
})
typeList = typeList[0].outerHTML;
RED.notify("<p>"+RED._("clipboard.importUnrecognised",{count:unknownTypes.length})+"</p>"+typeList,"error",false,10000); RED.notify("<p>"+RED._("clipboard.importUnrecognised",{count:unknownTypes.length})+"</p>"+typeList,"error",false,10000);
} }