-
- Downloads
[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 (&...) [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:Romain Derie (rde) <rde@odoo.com>
Loading
Please register or sign in to comment