From bb0ee1a3d1595ffcdcc2d6b6fd4cd2e825f16829 Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Fri, 7 Feb 2025 15:29:28 +0530 Subject: [PATCH 1/2] fix: data escaping issue with import file --- classes/Visualizer/Source.php | 2 +- classes/Visualizer/Source/Csv.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/Visualizer/Source.php b/classes/Visualizer/Source.php index afaf6020..03e7c99a 100644 --- a/classes/Visualizer/Source.php +++ b/classes/Visualizer/Source.php @@ -429,7 +429,7 @@ private function _fetchSeriesFromEditableTable() { foreach ( $headers as $header ) { if ( ! empty( $types[ $header ] ) ) { $this->_series[] = array( - 'label' => $header, + 'label' => esc_html( wp_strip_all_tags( $header ) ), 'type' => $types[ $header ], ); } diff --git a/classes/Visualizer/Source/Csv.php b/classes/Visualizer/Source/Csv.php index 5fca4e43..461fd8db 100644 --- a/classes/Visualizer/Source/Csv.php +++ b/classes/Visualizer/Source/Csv.php @@ -97,7 +97,7 @@ private function _fetchSeries( &$handle ) { $labels[ $i ] = $this->toUTF8( $labels[ $i ] ); $this->_series[] = array( - 'label' => $labels[ $i ], + 'label' => esc_html( wp_strip_all_tags( $labels[ $i ] ) ), 'type' => isset( $types[ $i ] ) ? $types[ $i ] : $default_type, ); } From e1ab9d9f76e417e2d789222deaffcd5a0b4486e9 Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Fri, 7 Feb 2025 15:34:47 +0530 Subject: [PATCH 2/2] bump: ubuntu version --- .github/workflows/test-e2e.yml | 2 +- .github/workflows/test-php.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index 1d035cde..a50a3364 100755 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -14,7 +14,7 @@ jobs: DOCKER_FILE: docker-compose.ci.yml strategy: fail-fast: false - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 diff --git a/.github/workflows/test-php.yml b/.github/workflows/test-php.yml index 417d580f..595a1850 100755 --- a/.github/workflows/test-php.yml +++ b/.github/workflows/test-php.yml @@ -36,7 +36,7 @@ jobs: phpunit: name: PHPUnit - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 services: mysql: image: mysql:5.7