Ghanshyam Katriya
Ghanshyam Katriya

Reputation: 1081

Not able to add + in fileeditor Yii extension

I am using fileeditor Yii extension http://www.yiiframework.com/extension/fileeditor When I am saving file using this file editor, it's working pretty fine except one case. It's removing + symbol from file contents.

Like, I am adding {$rownum = $rownum + 1} in file. After saving, it's replacing this line with

{$rownum = $rownum   1}

I don't know why it's happening, but somehow I am not able to find solution.

Upvotes: 3

Views: 57

Answers (1)

Jannes Botis
Jannes Botis

Reputation: 11242

The issue is in the controller FileeditorController.php at action actionPutContent.

Change line:

echo file_put_contents($file, urldecode ($_POST['filecontent']));

to

echo file_put_contents($file, $_POST['filecontent']);

Using "urldecode" on filecontent parameter does not make sense. The parameter is not url encoded when sent.

Upvotes: 1

Related Questions