MCPcopy Create free account
hub / github.com/53AI/53AIHub / extractTextFromHTML

Function extractTextFromHTML

api/service/tools/web_fetch.go:287–293  ·  view source on GitHub ↗
(raw string)

Source from the content-addressed store, hash-verified

285}
286
287func extractTextFromHTML(raw string) string {
288 s := htmlScriptStyleRe.ReplaceAllString(raw, " ")
289 s = htmlCommentRe.ReplaceAllString(s, " ")
290 s = htmlTagRe.ReplaceAllString(s, " ")
291 s = html.UnescapeString(s)
292 return normalizeWebFetchText(s)
293}
294
295func normalizeWebFetchText(raw string) string {
296 raw = strings.ReplaceAll(raw, "\r\n", "\n")

Callers 1

executeWebFetchFunction · 0.85

Calls 1

normalizeWebFetchTextFunction · 0.85

Tested by

no test coverage detected