Skip to content
Snippets Groups Projects
Commit 5f6d6cf1 authored by Martin Trigaux's avatar Martin Trigaux
Browse files

[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#68651

Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
parent c7b32e07
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment