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();

View File

@@ -307,7 +307,7 @@ try {
G::auditLog('DeleteLines','Delete all lines in process "'.$resultProcess['PRO_TITLE'].'"');
break;
case 'addText':
$sOutput = $oProcessMap->addText($oData->uid, $oData->label, $oData->position->x, $oData->position->y);
$sOutput = $oProcessMap->addText($oData->uid, html_entity_decode(html_entity_decode($oData->label)), $oData->position->x, $oData->position->y);
$sOutputAux = G::json_decode($sOutput);
$sOutputAux = (array)$sOutputAux;
G::auditLog('AddText','Add new text ('.$sOutputAux['uid'].') in process "'.$resultProcess['PRO_TITLE'].'"');