From 06f8d843c17f2880a1f1ad2bf35902a937458e1b Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Mon, 12 Jun 2023 15:34:04 +0300 Subject: [PATCH] - fixed #1197; --- includes/admin/core/class-admin-dragdrop.php | 28 +++++++++++--------- includes/core/class-fields.php | 15 +++++------ 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/includes/admin/core/class-admin-dragdrop.php b/includes/admin/core/class-admin-dragdrop.php index 18504e58..b135b91c 100644 --- a/includes/admin/core/class-admin-dragdrop.php +++ b/includes/admin/core/class-admin-dragdrop.php @@ -1,30 +1,37 @@ admin()->check_ajax_nonce(); @@ -153,12 +160,10 @@ if ( ! class_exists( 'um\admin\core\Admin_DragDrop' ) ) { update_option( 'um_form_rowdata_' . $form_id, $this->row_data ); UM()->query()->update_attr( 'custom_fields', $form_id, $fields ); - } - /** - * Load form to maintain form order + * Load form to maintain form order. */ public function load_field_order() { @@ -233,7 +238,7 @@ if ( ! class_exists( 'um\admin\core\Admin_DragDrop' ) ) { - +
@@ -244,6 +249,5 @@ if ( ! class_exists( 'um\admin\core\Admin_DragDrop' ) ) { filter_field_non_utf8_value( $v ); + $v = $this->filter_field_non_utf8_value( $v ); + $value_attr = ( ! empty( $v ) && is_string( $v ) ) ? wp_strip_all_tags( $v ) : $v; - $output .= 'is_selected( $key, $v, $data ) ) { $output .= 'checked'; @@ -3897,10 +3897,9 @@ if ( ! class_exists( 'um\core\Fields' ) ) { $output .= ' />'; if ( ! empty( $disabled ) && $this->is_selected( $key, $v, $data ) ) { - $output .= $this->disabled_hidden_field( $key . '[]', strip_tags( $v ) ); + $output .= $this->disabled_hidden_field( $key . '[]', $value_attr ); } - $output .= ''; /** * UM hook