diff --git src/wp-admin/nav-menus.php src/wp-admin/nav-menus.php
index 7a6a18c..2ab6334 100644
|
|
if ( isset( $_POST['nav-menu-data'] ) ) { |
59 | 59 | foreach ( $data as $post_input_data ) { |
60 | 60 | // For input names that are arrays (e.g. `menu-item-db-id[3]`), derive the array path keys via regex. |
61 | 61 | if ( preg_match( '#(.*)(?:\[(\d+)\])#', $post_input_data->name, $matches ) ) { |
62 | | if ( empty( $_POST[$matches[1]] ) ) { |
63 | | $_POST[$matches[1]] = array(); |
| 62 | if ( empty( $_POST[ $matches[1] ] ) ) { |
| 63 | $_POST[ $matches[1] ] = array(); |
64 | 64 | } |
65 | | $_POST[$matches[1]][(int)$matches[2]] = $post_input_data->value; |
| 65 | $_POST[ $matches[1] ][ (int) $matches[2] ] = wp_slash( $post_input_data->value ); |
66 | 66 | } else { |
67 | | $_POST[$post_input_data->name] = $post_input_data->value; |
| 67 | $_POST[ $post_input_data->name ] = wp_slash( $post_input_data->value ); |
68 | 68 | } |
69 | 69 | } |
70 | 70 | } |