Skip to content

Commit

Permalink
Fix double-encoding of translations in the web UI (lexik#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorissteyn authored and ubie.io committed Mar 12, 2018
1 parent f3600f7 commit e836b50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Resources/public/js/translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ app.factory('translationApiManager', ['$http', '$httpParamSerializer', function

var parameters = this.initializeParametersWithCsrf();
for (var name in translation) {
parameters[name] = encodeURIComponent(translation[name]);
parameters[name] = translation[name];
}

// force content type to make SF create a Request with the PUT parameters
Expand Down
2 changes: 1 addition & 1 deletion Util/DataGrid/DataGridRequestHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public function updateFromRequest($id, Request $request)

$translationsContent = array();
foreach ($this->localeManager->getLocales() as $locale) {
$translationsContent[$locale] = urldecode($request->request->get($locale));
$translationsContent[$locale] = $request->request->get($locale);
}

$this->transUnitManager->updateTranslationsContent($transUnit, $translationsContent);
Expand Down

0 comments on commit e836b50

Please sign in to comment.