mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-18 06:44:22 +01:00
Add RSS for profiles and relays
This commit is contained in:
9
utils.go
9
utils.go
@@ -317,6 +317,15 @@ func renderQuotesAsHTML(ctx context.Context, input string, usingTelegramInstantV
|
||||
})
|
||||
}
|
||||
|
||||
func linkQuotes(input string) string {
|
||||
return nostrNoteNeventMatcher.ReplaceAllStringFunc(input, func(match string) string {
|
||||
nip19 := match[len("nostr:"):]
|
||||
first_chars := nip19[:8]
|
||||
last_chars := nip19[len(nip19)-4:]
|
||||
return fmt.Sprintf(`<a href="/%s">%s</a>`, nip19, first_chars+"…"+last_chars)
|
||||
})
|
||||
}
|
||||
|
||||
func sanitizeXSS(html string) string {
|
||||
p := bluemonday.UGCPolicy()
|
||||
p.AllowStyling()
|
||||
|
||||
Reference in New Issue
Block a user