Skip to content

Commit

Permalink
fix problem with HTML tags in query
Browse files Browse the repository at this point in the history
  • Loading branch information
prugala committed Apr 6, 2021
1 parent 1234d1e commit 22a0fed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/DivanteTranslationBundle/Provider/DeeplProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function translate(string $data, string $targetLanguage): string
[
'query' => [
'auth_key' => $this->apiKey,
'text' => rawurlencode($data),
'text' => $data,
'target_lang' => locale_get_primary_language($targetLanguage),
]
]
Expand Down
2 changes: 1 addition & 1 deletion src/DivanteTranslationBundle/Provider/GoogleProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function translate(string $data, string $targetLanguage): string
[
'query' => [
'key' => $this->apiKey,
'q' => rawurlencode($data),
'q' => $data,
'source' => '',
'target' => locale_get_primary_language($targetLanguage),
]
Expand Down

0 comments on commit 22a0fed

Please sign in to comment.