Skip to content

Commit

Permalink
Fixed issue #13424: JavaScript is displayed in email notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Mar 1, 2018
1 parent 9f5e256 commit 7a2bf8b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions application/controllers/PrintanswersController.php
Expand Up @@ -124,6 +124,16 @@ function actionView($surveyid, $printableexport = false)
$oResponseRow = SurveyDynamic::model($iSurveyID);
$printanswershonorsconditions = Yii::app()->getConfig('printanswershonorsconditions');
$groupArray = $oResponseRow->getPrintAnswersArray($sSRID, $sLanguage, $printanswershonorsconditions);

// Remove all <script>...</script> content from result.
Yii::import('application.helpers.viewHelper');
foreach ($groupArray as &$group) {
$group['description'] = viewHelper::flatEllipsizeText($group['description'], true, 0);
foreach ($group['answerArray'] as &$answer) {
$answer['question'] = viewHelper::flatEllipsizeText($answer['question'], true, 0);
}
}

$aData['aSurveyInfo'] = $aSurveyInfo;
$aData['aSurveyInfo']['dateFormat'] = getDateFormatData(Yii::app()->session['dateformat']);
$aData['aSurveyInfo']['groupArray'] = $groupArray;
Expand Down

0 comments on commit 7a2bf8b

Please sign in to comment.