odoo/odoo#192029

Created by Website, Benjamin Vray (bvr)
Merged at 05236346abb3bf16a2c4330d923a17da9283708b

Statuses:

label
odoo-dev:16.0-fix-dynamic-snippets-in-search-results-bvr
head
31796e7ff746916d51d0aa27f3bc27031cde30d6
merged
10 months ago by Website, Serge Bayet (seba)
odoo/odoo
16.0 #192029
17.0 #193449
saas-17.2 #193468
saas-17.4 #193476
18.0 #193512
saas-18.1 #193527
saas-18.2
saas-18.3
saas-18.4
19.0
master #193541

[FIX] website: exclude technical content from search results

Steps to reproduce:

  • Enter website edit mode.
  • Drag and drop a "Products" dynamic snippet onto the page.
  • Drag and drop a "Search" snippet onto the page.
  • Save the page.
  • Perform a search for "dynamic" using the search input.
  • Bug: The dynamic snippet alert message appears in the results.

The same issue occurs with the "Embed code" snippet, where text inside "<script>" elements appears in search results.

With this commit, elements like "css_non_editable_mode_hidden" and "<script>" are excluded from search results.

opw-4420622