Skip to content
Snippets Groups Projects
Commit 08303459 authored by Arthur Detroux (ard)'s avatar Arthur Detroux (ard)
Browse files

[FIX] web_editor: prevent crash when filtering SVGs elements

When an SVG element changes and is filtered by the
`filterMutationRecords` method, the method tries to split its
className (Since [1]). This is not supported by the browser however,
because the className property of an SVGElement is not a String.
Rather, it is an SVGAnimatedString [2].

This commit fixes that by using the getAttribute method instead.
Ensuring that the attribute returned is always a String.

[1]: https://github.com/odoo/odoo/commit/1c25ddb42393b136cac2a0ee0b9b7280fd803e7d
[2]: https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimatedString



opw-3077287
opw-3074434

closes odoo/odoo#106671

Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
parent ad9dca99
No related branches found
No related tags found
No related merge requests found
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