From e8e48a2cc4fb6976819dcbea21e0470c8f9cb81c Mon Sep 17 00:00:00 2001 From: jokob-sk Date: Thu, 26 Jun 2025 07:25:10 +1000 Subject: [PATCH] integer causing normalization issue in MQTT #1102 --- server/helper.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/helper.py b/server/helper.py index 0f729f4b..ca7b22bb 100755 --- a/server/helper.py +++ b/server/helper.py @@ -495,6 +495,8 @@ def sanitize_SQL_input(val): # Function to normalize the string and remove diacritics def normalize_string(text): # Normalize the text to 'NFD' to separate base characters and diacritics + if not isinstance(text, str): + text = str(text) normalized_text = unicodedata.normalize('NFD', text) # Filter out diacritics and unwanted characters return ''.join(c for c in normalized_text if unicodedata.category(c) != 'Mn')