Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ php:
env:
matrix:
- DB=mysql db_dsn='mysql://[email protected]/cakephp_test'
- DB=pgsql db_class='Cake\Database\Driver\Postgres' db_dsn='postgres://[email protected]/cakephp_test' db_database='cakephp_test' db_username='travis' db_password=''
- DB=pgsql db_dsn='postgres://[email protected]/cakephp_test'
global:
- DEFAULT=1 CI=1

Expand All @@ -28,7 +28,7 @@ before_script:
- composer self-update
- composer install --prefer-source --no-interaction --dev

- if [[ $DB = 'mysql' ]]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi
- if [[ $DB = 'mysql' ]]; then mysql -u root -e 'CREATE DATABASE cakephp_test;'; fi
- if [[ $DB = 'pgsql' ]]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi

- if [[ $PHPCS != 1 ]]; then composer require phpunit/phpunit:"<6.0"; fi
Expand Down
6 changes: 4 additions & 2 deletions src/View/Helper/GoogleMapHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -1376,7 +1376,9 @@ public function staticMap(array $options = [], array $attributes = []) {
$defaultAttributes = ['alt' => __d('tools', 'Map')];
$attributes += $defaultAttributes;

return $this->Html->image($this->staticMapUrl($options), $attributes);
// This was fixed in 3.5.1 to auto-escape URL query strings for security reasons
$escape = version_compare(Configure::version(), '3.5.1') < 0 ? true : false;
return $this->Html->image($this->staticMapUrl($options + ['escape' => $escape]), $attributes);
}

/**
Expand All @@ -1395,7 +1397,7 @@ public function staticMapLink($title, array $mapOptions = [], array $linkOptions
* Creates a URL to a plain image map.
*
* Options:
* - escape: defaults to true
* - escape: defaults to true (Deprecated as of CakePHP 3.5.1 and now has to be always false)
*
* @param array $options
* - see staticMap() for details
Expand Down