X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/ce24094b892d3fb0faf000b5e2bf64f58ce4aae5..a8417d28fe5ab7385eb810a39ecd7b9fe2c9cdea:/modules/nodeFamilyTree/nodeFamilyTree.js?ds=sidebyside diff --git a/modules/nodeFamilyTree/nodeFamilyTree.js b/modules/nodeFamilyTree/nodeFamilyTree.js index e47821e..0825506 100644 --- a/modules/nodeFamilyTree/nodeFamilyTree.js +++ b/modules/nodeFamilyTree/nodeFamilyTree.js @@ -48,9 +48,15 @@ return function(sandbox) { nodeChildren.forEach(function(child) { if(child.getText) { var text = child.getText(); - if(text.length > 13) - text = text.substr(0,13) + '...'; - children.push({repr: '"' + text + '"', bold: child.sameNode(textElement)}); + if(!text) + text = ''; + else { + if(text.length > 13) { + text = text.substr(0,13) + '...'; + } + text = '"' + text + '"'; + } + children.push({repr: _.escape(text), bold: child.sameNode(textElement)}); } else { children.push({repr: child.getWlxmlTag() + (child.getWlxmlClass() ? ' / ' + child.getWlxmlClass() : '')}); }