From 5ac9242a22a381eaf5e9c2f6f5b241ae8cd4291b Mon Sep 17 00:00:00 2001 From: Stefan Hagspiel Date: Fri, 4 Jun 2021 14:31:21 +0200 Subject: [PATCH] fix google map location data escape (#156) --- UPGRADE.md | 3 ++- src/ToolboxBundle/Model/Document/Tag/GoogleMap.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/UPGRADE.md b/UPGRADE.md index fbd1b75d..f75ff6de 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -9,7 +9,8 @@ Just click the "update" button or execute the migration command to finish the bu #### Update from Version 3.2.5 to Version 3.3.0 - **[NEW FEATURE]**: Pimcore 6.9.0 ready - **[IMPROVEMENT]**: use no-cookie domain for youtube videos [@ghettopro](https://github.com/dachcom-digital/pimcore-toolbox/pull/153) -- **[BUG FIX]**: Fix invalid asset video markup[@gpalmisano](https://github.com/dachcom-digital/pimcore-toolbox/pull/154) +- **[BUG FIX]**: Fix invalid asset video markup [@gpalmisano](https://github.com/dachcom-digital/pimcore-toolbox/pull/154) +- **[BUG FIX]**: Fix google maps locations with single quotes [#151](https://github.com/dachcom-digital/pimcore-toolbox/issues/151) #### Update from Version 3.2.4 to Version 3.2.5 - **[BUG FIX]**: Fix column adjuster column_store availability check diff --git a/src/ToolboxBundle/Model/Document/Tag/GoogleMap.php b/src/ToolboxBundle/Model/Document/Tag/GoogleMap.php index a9aa87d5..fedceb56 100644 --- a/src/ToolboxBundle/Model/Document/Tag/GoogleMap.php +++ b/src/ToolboxBundle/Model/Document/Tag/GoogleMap.php @@ -58,7 +58,7 @@ public function frontend() $configData = property_exists($this, 'config') ? $this->config : $this->options; $dataAttr = []; - $dataAttr['data-locations'] = json_encode($this->data); + $dataAttr['data-locations'] = json_encode($this->data, JSON_HEX_QUOT | JSON_HEX_APOS); $dataAttr['data-show-info-window-on-load'] = $configData['iwOnInit']; $dataAttr['data-mapoption-zoom'] = $configData['mapZoom'];