ExtractImageURLs finds image URLs from tags and elements.
(s string)
| 27 | |
| 28 | // MessageSourceText returns the source-backed text carried by HTML message content. |
| 29 | func MessageSourceText(s string) string { |
| 30 | doc, err := html.Parse(strings.NewReader(s)) |
| 31 | if err != nil { |
| 32 | return "" |
| 33 | } |
| 34 | var b strings.Builder |
| 35 | walkMessageSourceNode(&b, doc, 0) |
| 36 | return strings.TrimSpace(b.String()) |
| 37 | } |
| 38 | |
| 39 | // PrependHTML adds an HTML note before existing HTML content. |
| 40 | func PrependHTML(content, note string) string { |