1
0
mirror of https://github.com/LibreTranslate/LibreTranslate.git synced 2024-11-04 23:10:13 +01:00

Merge pull request #459 from SethFalco/fix-query-params

fix: stop double encoding query params
This commit is contained in:
Piero Toffanin 2023-07-08 14:27:12 +02:00 committed by GitHub
commit 57cfdec439
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -206,7 +206,7 @@ document.addEventListener('DOMContentLoaded', function(){
this.updateQueryParam('source', this.sourceLang)
this.updateQueryParam('target', this.targetLang)
this.updateQueryParam('q', encodeURI(this.inputText))
this.updateQueryParam('q', this.inputText)
if (this.timeout) clearTimeout(this.timeout);
this.timeout = null;
@ -470,7 +470,7 @@ function handleLangsResponse(self, response) {
const defaultText = self.getQueryParam("q")
if (defaultText) {
self.inputText = decodeURI(defaultText)
self.inputText = defaultText
self.handleInput(new Event('none'))
}
} else {