From e3ab4bd212e44c39f439ec4ff5df7c3dbd046895 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Mon, 1 Jun 2026 12:37:34 -0700 Subject: [PATCH] refac Co-Authored-By: Zixin Yu <183055163+ivvi0927@users.noreply.github.com> --- backend/open_webui/utils/misc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/utils/misc.py b/backend/open_webui/utils/misc.py index b8336e8fe7..e9cb78dc75 100644 --- a/backend/open_webui/utils/misc.py +++ b/backend/open_webui/utils/misc.py @@ -711,7 +711,7 @@ def sanitize_data_for_db(obj): # json.dumps is implemented in C and much faster than a Python-level # recursive walk over every leaf string. try: - if '\x00' not in json.dumps(obj, ensure_ascii=False): + if '\\u0000' not in json.dumps(obj, ensure_ascii=False): return obj except (TypeError, ValueError): pass