[FIX] website_sale: strip category description from html tags

Step to reproduce:
- In e-commerce go to a category
- Edit the page to add a text block at the beginning
- Save
- Go back to main page
- Search the category

Current behaviour:
- The search bar show the text block as the category description
 But the description also contains the html linked to the bloc
 which lead to ugly unhelpful description

Behaviour after PR:
- html tags are stripped from the description returned to
 the search bar

opw-2781450

closes odoo/odoo#87454

X-original-commit: 25952894b0d07e60c79a212cbc05b4346bb36b1a
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
This commit is contained in:
Florian Damhaut
2022-03-29 20:21:26 +02:00
parent 9b9ed45c5a
commit 73b1f73a69
@@ -62,7 +62,7 @@ class ProductPublicCategory(models.Model):
if with_description:
search_fields.append('website_description')
fetch_fields.append('website_description')
mapping['description'] = {'name': 'website_description', 'type': 'text', 'match': True}
mapping['description'] = {'name': 'website_description', 'type': 'text', 'match': True, 'html': True}
return {
'model': 'product.public.category',
'base_domain': [], # categories are not website-specific