diff --git a/php/classes/class-qmn-quiz-manager.php b/php/classes/class-qmn-quiz-manager.php
index b461f7046..0cd4b90b0 100644
--- a/php/classes/class-qmn-quiz-manager.php
+++ b/php/classes/class-qmn-quiz-manager.php
@@ -1926,7 +1926,7 @@ public function submit_results( $qmn_quiz_options, $qmn_array_for_variables ) {
if ( 1 === intval( $qmn_quiz_options->store_responses ) && ! $qmn_array_for_variables['response_saved'] ) {
$result_display .= '
' . __('Your responses are not being saved in the database due to a technical issue. Please contact the website administrator for assistance.', 'quiz-master-next') . '
';
}
- $result_display .= $results_pages['display'];
+ $result_display .= wp_kses_post( htmlspecialchars_decode( $results_pages['display'], ENT_QUOTES) );
$result_display = apply_filters( 'qmn_after_results_text', $result_display, $qmn_quiz_options, $qmn_array_for_variables );
$result_display .= $this->display_social( $qmn_quiz_options, $qmn_array_for_variables );
@@ -2001,7 +2001,7 @@ public function submit_results( $qmn_quiz_options, $qmn_array_for_variables ) {
// Prepares data to be sent back to front-end.
$return_array = array(
'quizExpired' => false,
- 'display' => wp_kses_post( htmlspecialchars_decode( $result_display, ENT_QUOTES) ),
+ 'display' => $result_display,
'redirect' => apply_filters( 'mlw_qmn_template_variable_results_page', $results_pages['redirect'], $qmn_array_for_variables ),
'result_status' => array(
'save_response' => $qmn_array_for_variables['response_saved'],