From 914039ac8111148a27f49bc0ca7ceedc5284ecb3 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Mon, 29 Jun 2026 09:16:37 +0200 Subject: [PATCH] Escape voice-derived attributes in Azure TTS SSML (#25776) The Azure TTS handler (_tts_azure) interpolated the user-supplied voice, and the locale derived from it, into the SSML xml:lang and attributes without XML-escaping, while the text body was already escaped (2e75c6dbd). Escape both attributes too, so every user-derived value in the SSML document is consistently encoded. Co-authored-by: alanturing881 Co-authored-by: Claude Opus 4.8 (1M context) --- backend/open_webui/routers/audio.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/routers/audio.py b/backend/open_webui/routers/audio.py index 3bf68699fb..926380bf52 100644 --- a/backend/open_webui/routers/audio.py +++ b/backend/open_webui/routers/audio.py @@ -442,8 +442,8 @@ async def _tts_azure(request, payload, file_path, file_body_path, user): output_format = await Config.get('audio.tts.azure.speech_output_format') ssml = ( - f'' - f'{html.escape(payload["input"])}' + f'' + f'{html.escape(payload["input"])}' f'' )