MCPcopy Create free account
hub / github.com/MMadmer/EpicAssetsNotifyBot / normalizeImageURL

Function normalizeImageURL

internal/fab/scraper.go:352–364  ·  view source on GitHub ↗
(url string)

Source from the content-addressed store, hash-verified

350}
351
352func normalizeImageURL(url string) string {
353 if url == "" {
354 return ""
355 }
356 switch {
357 case strings.HasPrefix(url, "//"):
358 return "https:" + url
359 case strings.HasPrefix(url, "/"):
360 return "https://www.fab.com" + url
361 default:
362 return url
363 }
364}
365
366func stripTags(input string) string {
367 return html.UnescapeString(htmlTagPattern.ReplaceAllString(input, ""))

Callers 1

parseAssetsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected