diff --git a/php/admin/options-page-style-tab.php b/php/admin/options-page-style-tab.php index 038ddf4cf..02b0ed6c4 100644 --- a/php/admin/options-page-style-tab.php +++ b/php/admin/options-page-style-tab.php @@ -39,7 +39,7 @@ function qsm_options_styling_tab_content() { $style_quiz_id = isset( $_POST['style_quiz_id'] ) ? intval( $_POST['style_quiz_id'] ) : ''; $quiz_theme = isset( $_POST['save_quiz_theme'] ) ? sanitize_text_field( wp_unslash( $_POST['save_quiz_theme'] ) ) : ''; - $quiz_style = isset( $_POST['quiz_css'] ) ? htmlspecialchars( preg_replace( '##is', '', sanitize_textarea_field( wp_unslash( $_POST['quiz_css'] ) ) ), ENT_QUOTES ) : ''; + $quiz_style = isset( $_POST['quiz_css'] ) ? htmlspecialchars( preg_replace( '##is', '', sanitize_textarea_field( wp_unslash( $_POST['quiz_css'] ) ) ), ENT_QUOTES, 'UTF-8', false) : ''; // Saves the new css. $results = $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->prefix}mlw_quizzes SET quiz_stye=%s, theme_selected=%s, last_activity=%s WHERE quiz_id=%d", $quiz_style, $quiz_theme, gmdate( 'Y-m-d H:i:s' ), $style_quiz_id ) ); @@ -231,7 +231,7 @@ function qsm_options_styling_tab_content() {
+ name="quiz_css">(.*?)#is', '', htmlspecialchars_decode( $mlw_quiz_options->quiz_stye, ENT_QUOTES) ) ); ?> |