DomainValidator.get_trusted_domain_object_from_sid() was using escape_filter_chars() with bytes. The function only works with text. This caused idview to fail under some circumstances. Reimplement backslash hex quoting for bytes. Fixes: https://pagure.io/freeipa/issue/7958 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>