[FIX] website: fix missing space on whatsapp text for "share" block

To reproduce the issue:

- Website > Edit mode > Add "Share" block > Save.
- Click WhatsApp > Missing space between page title and its URL.

Starting from [1], the `$('title').text()` value was replaced on "Share"
snippet by `document.title` (which will trim and collapse whitespaces
in the page title). This leads to a missing space between page title
and the shared URL.

After this commit, the correct spacing is restored.

[1]: https://github.com/odoo/odoo/commit/ddb2c06be4196c86ff6a2fd74874487d75b31c94

opw-3084367

X-original-commit: e7e9eb4f806680b19f3ec61fb080316a3160e7fb
Part-of: odoo/odoo#108724
This commit is contained in:
xO-Tx
2022-12-27 16:49:57 +01:00
committed by qsm-odoo
parent 850c821f7e
commit 5e1074340f
@@ -63,7 +63,7 @@ const ShareWidget = publicWidget.Widget.extend({
// parameter, merging everything together, e.g of output:
// https://wa.me/?text=%20OpenWood%20Collection%20Online%20Reveal%20%7C%20My%20Website%20http%3A%2F%2Flocalhost%3A8888%2Fevent%2Fopenwood-collection-online-reveal-2021-06-21-2021-06-23-8%2Fregister
// For more details, see https://faq.whatsapp.com/general/chats/how-to-use-click-to-chat/
return a + title + url + c;
return `${a + title}%20${url + c}`;
}
return a + title + c;
})