From 2e75c6dbdf0658e6689fba1e477f8021a3e85d54 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Wed, 1 Oct 2025 23:01:08 -0500 Subject: [PATCH] refac/fix: azure audio escape --- backend/open_webui/routers/audio.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/open_webui/routers/audio.py b/backend/open_webui/routers/audio.py index 100610a83a..e0aee2f726 100644 --- a/backend/open_webui/routers/audio.py +++ b/backend/open_webui/routers/audio.py @@ -3,6 +3,7 @@ import json import logging import os import uuid +import html from functools import lru_cache from pydub import AudioSegment from pydub.silence import split_on_silence @@ -458,7 +459,7 @@ async def speech(request: Request, user=Depends(get_verified_user)): try: data = f""" - {payload["input"]} + {html.escape(payload["input"])} """ timeout = aiohttp.ClientTimeout(total=AIOHTTP_CLIENT_TIMEOUT) async with aiohttp.ClientSession(