Skip to content

Commit

Permalink
Fixed issue #6528: Save changes on label set results in a php warning…
Browse files Browse the repository at this point in the history
… when text contains a tab character
  • Loading branch information
c-schmitz committed Sep 13, 2012
1 parent 03d5601 commit 43b8d44
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions application/helpers/admin/label_helper.php
Expand Up @@ -144,12 +144,16 @@ function modlabelsetanswers($lid)
$_POST['method'] = $clang->gT("Save");
}

//unescape single quotes
$labeldata = Yii::app()->getRequest()->getPost('dataToSend');
$labeldata = str_replace("\'","'",$labeldata);


$data = json_decode($labeldata);
$sPostData = Yii::app()->getRequest()->getPost('dataToSend');
$sPostData=str_replace("\t", '', $sPostData);
if (get_magic_quotes_gpc())
{
$data = json_decode(stripslashes($sPostData));
}
else
{
$data = json_decode($sPostData);
}

if ($ajax)
$lid = insertlabelset();
Expand Down

0 comments on commit 43b8d44

Please sign in to comment.