Since [1] and even after [2] when replacing a media by a media of a different type only classes were cleaned - but all inline styles were copied. This commit filters the inline styles when replacing a media by a media of another type. Steps to reproduce: - Drop a "Text - Image". - Replace the image by an icon. - Apply solid colors for the foreground and the background. - Replace the icon by an image. => The applied colors were kept in the inline style of the image. [1]: https://github.com/odoo/odoo/commit/7fd0698cf765a79959566b51e33cb76bff83d344 [2]: https://github.com/odoo/odoo/commit/9ca349bbdb75505e8dbd31898f05ba8d694e7953 task-2687506 closes odoo/odoo#95853 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>