Fix stripHTMLFromToolInput conversion escaping (#4989)

* fix to square bracket handling

* updated comment
This commit is contained in:
russelj1
2025-08-11 12:16:18 +01:00
committed by GitHub
parent 68dc041d02
commit 114a844964
+2 -2
View File
@@ -1346,8 +1346,8 @@ export const refreshOAuth2Token = async (
export const stripHTMLFromToolInput = (input: string) => {
const turndownService = new TurndownService()
let cleanedInput = turndownService.turndown(input)
// After conversion, replace any escaped underscores with regular underscores
cleanedInput = cleanedInput.replace(/\\_/g, '_')
// After conversion, replace any escaped underscores and square brackets with regular unescaped ones
cleanedInput = cleanedInput.replace(/\\([_[\]])/g, '$1')
return cleanedInput
}