Daily updates from Odoo
Monday, July 7, 2025
1 change · master
Code cleanup and technical improvements
This update replaces a risky way of clearing page content with a safer equivalent in selected enterprise web flows. It reduces unnecessary security warnings while keeping the user experience unchanged.
Original PR description
Writing on innerHTML is generally not recommended as it can lead to security issues. This is highlighted by triggering the ci/security. `setElementContent` utils is now available to safely write it on `innerHTML` by checking the content type (markup in particular). However, when writing an empty value, using `textContent` has the same effect of clearing all children. It is therefore preferable to use it instead, in order to remove direct usage of `innerHTML` in code and to avoid triggering unncessary security checks. https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent https://github.com/odoo/odoo/pull/216066