When Markup objects are joined by a str, the result will be a str. So, here: https://github.com/odoo/odoo/blob/5f3db6683ab191cb68af4c8d6bb2e86a5b114ee1/addons/purchase/models/account_invoice.py#L137 altought refs is all markup objects, join will return a normal str object that will be escaped. To fix, we join them by markup object. closes odoo/odoo#122268 X-original-commit: cc4a50091e540ddcc8b46ee77277bd53e634d536 Signed-off-by: Steve Van Essche <svs@odoo.com>