Skip to content
Snippets Groups Projects
Commit 30cb1c23 authored by Benoit Socias's avatar Benoit Socias
Browse files

[FIX] website: avoid double-escape of pages search results

Since [1] when the search bar was refactored, a search facility was
added on website pages and the rendering of those search results did
not correctly handle some of the HTML escaping.

This is related to the fact that the `ir_ui_view`'s `arch_db` field is
stored with this double escaping on text nodes, which is done by
`wysiwyg.js` through the `_getEscapedElement` method since [2].

This commit unescapes the last layer of `&` before extracting the
page's text for generating the search results.

Steps to reproduce:
- Add some "&", "<" or ">" characters in a page.
- Use the search snippet to lookup for the page.
=> The results in both autocomplete and the results pages display the
content with an extra unwanted escaping (&amp;...)

[1]: https://github.com/odoo/odoo/commit/9f9c4bb7e40233e633f97c60fb00ae191e9077af
[2]: https://github.com/odoo/odoo/commit/f5acea7f9ce232773ec3adf1828a3d18bbedee1e



opw-2908645

closes odoo/odoo#96620

Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
parent d491d205
No related branches found
No related tags found
Loading
Loading
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