Since Python 3.10, the invalid escape sequence warning use quotes to display the invalid sequence. Because of that, the filter does not catch it anymore. With this commit, they are caught in all supported versions. Part-of: odoo/odoo#91927