File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 55
55
SurveyUtil::check_first_last_question ($ surveyId , false );
56
56
57
57
// Survey information
58
- echo '<div class="page-header"><h2> ' .$ survey_data ['survey_title ' ].'</h2></div> ' ;
58
+ echo '<div class="page-header"><h2> ' .Security:: remove_XSS ( $ survey_data ['survey_title ' ]) .'</h2></div> ' ;
59
59
if (!empty ($ survey_data ['survey_subtitle ' ])) {
60
- echo '<div id="survey_subtitle"> ' .$ survey_data ['survey_subtitle ' ].'</div> ' ;
60
+ echo '<div id="survey_subtitle"> ' .Security:: remove_XSS ( $ survey_data ['survey_subtitle ' ]) .'</div> ' ;
61
61
}
62
62
63
63
// Displaying the survey introduction
64
64
if (!isset ($ _GET ['show ' ])) {
65
65
if (!empty ($ survey_data ['survey_introduction ' ])) {
66
- echo '<div class="survey_content"> ' .$ survey_data ['survey_introduction ' ].'</div> ' ;
66
+ echo '<div class="survey_content"> ' .Security:: remove_XSS ( $ survey_data ['survey_introduction ' ]) .'</div> ' ;
67
67
}
68
68
}
69
69
70
70
// Displaying the survey thanks message
71
71
if (isset ($ _POST ['finish_survey ' ])) {
72
72
echo Display::return_message (get_lang ('SurveyFinished ' ), 'confirm ' );
73
- echo $ survey_data ['survey_thanks ' ];
73
+ echo Security:: remove_XSS ( $ survey_data ['survey_thanks ' ]) ;
74
74
Display::display_footer ();
75
75
exit ;
76
76
}
Original file line number Diff line number Diff line change @@ -3472,6 +3472,8 @@ public static function get_survey_data(
3472
3472
$ efv = new ExtraFieldValue ('survey ' );
3473
3473
while ($ survey = Database::fetch_array ($ res )) {
3474
3474
$ array [0 ] = $ survey [0 ];
3475
+ $ survey [1 ] = Security::remove_XSS ($ survey [1 ]);
3476
+
3475
3477
if (self ::checkHideEditionToolsByCode ($ survey ['col2 ' ])) {
3476
3478
$ array [1 ] = $ survey [1 ];
3477
3479
} else {
@@ -3711,6 +3713,8 @@ public static function getSurveyList($user_id)
3711
3713
continue ;
3712
3714
}
3713
3715
3716
+ $ title = Security::remove_XSS ($ row ['title ' ]);
3717
+
3714
3718
echo '<tr> ' ;
3715
3719
if ($ row ['answered ' ] == 0 ) {
3716
3720
echo '<td> ' ;
@@ -3723,7 +3727,7 @@ public static function getSurveyList($user_id)
3723
3727
);
3724
3728
echo '<a href=" ' .$ url .'">
3725
3729
' .$ icon
3726
- .$ row [ ' title ' ]
3730
+ .$ title
3727
3731
.'</a></td> ' ;
3728
3732
} else {
3729
3733
$ isDrhOfCourse = CourseManager::isUserSubscribedInCourseAsDrh (
@@ -3748,7 +3752,7 @@ public static function getSurveyList($user_id)
3748
3752
'survey_id ' => $ row ['survey_id ' ],
3749
3753
])
3750
3754
)
3751
- : $ icon .PHP_EOL .$ row [ ' title ' ] ;
3755
+ : $ icon .PHP_EOL .$ title ;
3752
3756
echo '</td> ' ;
3753
3757
}
3754
3758
echo '<td class="text-center"> ' ;
@@ -3762,7 +3766,6 @@ public static function getSurveyList($user_id)
3762
3766
echo '<td class="text-center"> ' .($ efvMandatory ['value ' ] ? get_lang ('Yes ' ) : get_lang ('No ' )).'</td> ' ;
3763
3767
}
3764
3768
echo '</tr> ' ;
3765
-
3766
3769
$ surveyIds [] = $ row ['survey_id ' ];
3767
3770
}
3768
3771
echo '</tbody> ' ;
You can’t perform that action at this time.
0 commit comments