Skip to content

Commit

Permalink
refPageParams: escaping opt output
Browse files Browse the repository at this point in the history
  • Loading branch information
handcode committed Nov 17, 2021
1 parent 8cf02e0 commit 78f7939
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions controllers/DefaultController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use Yii;
use yii\base\Event;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
use yii\helpers\Json;
use yii\helpers\Url;
use yii\web\Controller;
Expand Down Expand Up @@ -89,13 +90,13 @@ protected function refPageActionParamPageId()
continue;
}
// build human-readable label for each leave
$pages[$leave->id] = implode(' :: ', ArrayHelper::merge(ArrayHelper::map($leave->parents()->all(), 'id', 'name'), [$leave->name . ' (' . $leave->id . ')']));
$pages[$leave->id] = Html::encode(implode(' :: ', ArrayHelper::merge(ArrayHelper::map($leave->parents()->all(), 'id', 'name'), [$leave->name . ' (' . $leave->id . ')'])));
}
}
}
}

$params = ArrayHelper::merge(['' => Yii::t('pages', 'Select target page')], $pages);
$params = ArrayHelper::merge(['' => Html::encode(Yii::t('pages', 'Select target page'))], $pages);
return $params;

}
Expand Down

0 comments on commit 78f7939

Please sign in to comment.