[FIX] transifex: escape ' in urls
Translation "Let's go" Makes a Transifex search text:'Let\'s go' That should be converted to q=text%3A'Let%5C%27s+go' in the URL Removing the ' works from time to time but not always closes odoo/odoo#70561 X-original-commit: 5f6d6cf1b4c76a2f0031c269501054e816c65e97 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit is contained in:
@@ -75,7 +75,7 @@ class IrTranslation(models.Model):
|
||||
continue
|
||||
|
||||
# e.g. https://www.transifex.com/odoo/odoo-10/translate/#fr/sale/42?q=text:'Sale+Order'
|
||||
src = werkzeug.urls.url_quote_plus(translation.src[:50].replace("\n", "").replace("'", ""))
|
||||
src = werkzeug.urls.url_quote_plus(translation.src[:50].replace("\n", "").replace("'", "\\'"))
|
||||
src = f"'{src}'" if "+" in src else src
|
||||
translation.transifex_url = "%(url)s/%(project)s/translate/#%(lang)s/%(module)s/42?q=%(src)s" % {
|
||||
'url': base_url,
|
||||
|
||||
Reference in New Issue
Block a user