PM-2744 Correccion de caracteres especiales al añadir un texto

This commit is contained in:
Brayan Pereyra
2015-05-15 13:59:13 -04:00
parent 9b440d6a32
commit 4f91e5b8e7
2 changed files with 4 additions and 3 deletions

View File

@@ -2661,9 +2661,10 @@ processmap.prototype={
uid:false
};
this.data.build.text(index);
text = text.replace(/"/g, '\\"');
var r = new leimnud.module.rpc.xmlhttp({
url:this.options.dataServer,
args:"action=addText&data="+{uid:this.options.uid,label:text,position:{x:pos.x,y:pos.y}}.toJSONString()
args:"action=addText&data="+{uid:this.options.uid,label:encodeURIComponent(text),position:{x:pos.x,y:pos.y}}.toJSONString()
});
r.callback=function(rpc,index){
var rs = rpc.xmlhttp.responseText.parseJSON();