| @@ -531,8 +531,11 @@ | ||
| 531 | 531 | // Set current screen for the render chart. |
| 532 | 532 | set_current_screen( 'visualizer_render_chart' ); |
| 533 | 533 | // check chart, if chart not exists, will create new one and redirects to the same page with proper chart id |
| 534 | 534 | $chart_id = isset( $_GET['chart'] ) ? filter_var( $_GET['chart'], FILTER_VALIDATE_INT ) : ''; |
| 535 | + if ( ! empty( $_POST ) ) { | |
| 536 | + $_POST = map_deep( $_POST, 'wp_strip_all_tags' ); | |
| 537 | + } | |
| 535 | 538 | if ( ! $chart_id || ! ( $chart = get_post( $chart_id ) ) || $chart->post_type !== Visualizer_Plugin::CPT_VISUALIZER ) { |
| 536 | 539 | if ( empty( $_GET['lang'] ) || empty( $_GET['parent_chart_id'] ) ) { |
| 537 | 540 | $this->deleteOldCharts(); |
| 538 | 541 | $default_type = isset( $_GET['type'] ) && ! empty( $_GET['type'] ) ? $_GET['type'] : 'line'; |