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(