mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-23 07:09:29 +01:00
refac: latex handling
This commit is contained in:
@@ -7,6 +7,9 @@ import { WEBUI_BASE_URL } from '$lib/constants';
|
||||
//////////////////////////
|
||||
|
||||
export const sanitizeResponseContent = (content: string) => {
|
||||
// replace single backslash with double backslash
|
||||
content = content.replace(/\\/g, '\\\\');
|
||||
|
||||
// First, temporarily replace valid <video> tags with a placeholder
|
||||
const videoTagRegex = /<video\s+src="([^"]+)"\s+controls><\/video>/gi;
|
||||
const placeholders: string[] = [];
|
||||
|
||||
Reference in New Issue
Block a user