[FIX] mail: Escape translated emoji strings

Steps:
- Install knowledge on a fresh db
- Install and set fr_BE language
- Open knowldge
- Traceback

The traceback occurs because `emoji_registry.js` fails to load `emoji_data.js`
because of some translated string that contains non-escaped characters for JSON

opw-3110823

closes odoo/odoo#109086

X-original-commit: 455b335ae773ae4c8f5197c2a6f517947e6a7009
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
Achraf
2023-01-04 18:49:43 +01:00
parent 0fad8837f4
commit 0c49994ea8
@@ -55,7 +55,8 @@
// Since JSON grammar is way simpler than JavaScript's grammar, it is actually
// faster to parse the data as a JSON object than as a JavaScript object.
import { _lt } from "@web/core/l10n/translation";
import { _lt as lazyTranslate } from "@web/core/l10n/translation";
const _lt = str => JSON.stringify(lazyTranslate(str)).slice(1, -1);
export const emojiCategoriesData = JSON.parse(`[
{