forked from open-webui/open-webui
		
	fix: <br> is not escaped in output text
This commit is contained in:
		
							parent
							
								
									e6fad5ccb0
								
							
						
					
					
						commit
						8e94618c51
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		|  | @ -35,13 +35,12 @@ export const sanitizeResponseContent = (content: string) => { | |||
| 		.replace(/<\|[a-z]+\|$/, '') | ||||
| 		.replace(/<$/, '') | ||||
| 		.replaceAll(/<\|[a-z]+\|>/g, ' ') | ||||
| 		.replaceAll(/<br\s?\/?>/gi, '\n') | ||||
| 		.replaceAll('<', '<') | ||||
| 		.trim(); | ||||
| }; | ||||
| 
 | ||||
| export const revertSanitizedResponseContent = (content: string) => { | ||||
| 	return content.replaceAll('<', '<'); | ||||
|     return content.replaceAll('<', '<'); | ||||
| }; | ||||
| 
 | ||||
| export const capitalizeFirstLetter = (string) => { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Danny Liu
						Danny Liu