From 4f91e5b8e76c12a5471f72ae897b0d675b6264a1 Mon Sep 17 00:00:00 2001 From: Brayan Pereyra Date: Fri, 15 May 2015 13:59:13 -0400 Subject: [PATCH] =?UTF-8?q?PM-2744=20Correccion=20de=20caracteres=20especi?= =?UTF-8?q?ales=20al=20a=C3=B1adir=20un=20texto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workflow/engine/js/processmap/core/processmap.js | 3 ++- workflow/engine/methods/processes/processes_Ajax.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/workflow/engine/js/processmap/core/processmap.js b/workflow/engine/js/processmap/core/processmap.js index 30ce8b36c..4746bcd6e 100755 --- a/workflow/engine/js/processmap/core/processmap.js +++ b/workflow/engine/js/processmap/core/processmap.js @@ -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(); diff --git a/workflow/engine/methods/processes/processes_Ajax.php b/workflow/engine/methods/processes/processes_Ajax.php index 17a4ab221..d43672bc3 100755 --- a/workflow/engine/methods/processes/processes_Ajax.php +++ b/workflow/engine/methods/processes/processes_Ajax.php @@ -38,7 +38,7 @@ try { break; } */ //$oJSON = new Services_JSON(); - + G::LoadSystem('inputfilter'); $filter = new InputFilter(); $_GET = $filter->xssFilterHard($_GET); @@ -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'].'"');