Skip to content

Commit

Permalink
Fix #965 issue with quotes in Admin strings used in JS
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviocopes committed Feb 13, 2017
1 parent 2ca6f80 commit 799f13b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

1. [](#bugfix)
* Fix issue with validating page when switching language [#963](https://github.com/getgrav/grav-plugin-admin/issues/963)
* Fix issue with quotes in Admin strings used in JS [#965](https://github.com/getgrav/grav-plugin-admin/issues/965)

# v1.2.12
## 02/12/2017
Expand Down
2 changes: 1 addition & 1 deletion admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ protected function initializeAdmin()

foreach ($strings as $string) {
$separator = (end($strings) === $string) ? '' : ',';
$translations .= '"' . $string . '": "' . $this->admin->translate('PLUGIN_ADMIN.' . $string) . '"' . $separator;
$translations .= '"' . $string . '": "' . htmlspecialchars($this->admin->translate('PLUGIN_ADMIN.' . $string)) . '"' . $separator;
}

$translations .= '};';
Expand Down

0 comments on commit 799f13b

Please sign in to comment.