Skip to content

Commit

Permalink
fixed br issue with paragraph image type
Browse files Browse the repository at this point in the history
  • Loading branch information
zubairraeen committed Sep 12, 2024
1 parent 1694c50 commit 103c784
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions php/template-variables.php
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,7 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
if ( isset( $answer['question_type'] ) && in_array( intval( $answer['question_type'] ), $question_with_text_input, true ) ) {
$do_show_wrong = true;
$user_given_answer = '' === $answer[1] ? $quiz_options->no_answer_text : htmlentities( $answer[1] );
$user_given_answer = str_replace( "\n" , "<br>", $user_given_answer );
if ( 12 == $answer['question_type'] && ! empty( $answer[1] ) && strtotime( $user_given_answer ) ) {
$preferred_date_format = isset($quiz_options->preferred_date_format) ? $quiz_options->preferred_date_format : get_option('date_format');
$user_given_answer = date_i18n($preferred_date_format, strtotime($user_given_answer));
Expand Down

0 comments on commit 103c784

Please sign in to comment.