Bug message: uncaught exception: text can not be null, line:0, : fixed.

This commit is contained in:
Paulo Gustavo Veiga
2012-09-01 10:17:15 -03:00
parent 00829bfcc4
commit c4f4756e4a
3 changed files with 36 additions and 35 deletions

View File

@@ -170,7 +170,7 @@ mindplot.persistence.XMLSerializer_Pela = new Class({
},
_noteTextToXML:function (document, elem, text) {
if (text.indexOf('\n') == -1) {
if (text.indexOf('\n') == -1 && text.indexOf("&") == -1 && text.indexOf("<") == -1 && text.indexOf("\"") == -1) {
elem.setAttribute('text', text);
} else {
var textDom = document.createElement("text");
@@ -256,7 +256,7 @@ mindplot.persistence.XMLSerializer_Pela = new Class({
var topic = mindmap.createNode(type, id);
var text = domElem.getAttribute('text');
if ($defined(text)) {
if ($defined(text) && text) {
topic.setText(text);
}