Merged in cochalo/processmaker/PM-2744 (pull request #2210)

PM-2744 Correccion de caracteres especiales al añadir un texto
This commit is contained in:
Julio Cesar Laura Avendaño
2015-05-18 12:08:46 -04:00
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

@@ -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'].'"');