правки
This commit is contained in:
@@ -65,7 +65,6 @@ const buttonURLPlaceholder = "https://example.com"
|
||||
|
||||
var inviteLinkPattern = regexp.MustCompile(`https?://t\.me/(?:\+|joinchat/)[a-zA-Z0-9_-]+`)
|
||||
var inviteLinkTagPattern = regexp.MustCompile(`<a\s+class="tg-link">\s*(.*?)\s*</a>`)
|
||||
var htmlTagPattern = regexp.MustCompile(`<[^>]+>`)
|
||||
|
||||
const (
|
||||
inputModeText = "text"
|
||||
@@ -193,7 +192,7 @@ func (e *CreativeEditorFields) GetCreativeText() string {
|
||||
sub := inviteLinkTagPattern.FindStringSubmatch(match)
|
||||
inner := ""
|
||||
if len(sub) > 1 {
|
||||
inner = strings.TrimSpace(htmlTagPattern.ReplaceAllString(sub[1], ""))
|
||||
inner = strings.TrimSpace(sub[1])
|
||||
}
|
||||
if inner == "" {
|
||||
inner = inviteLinkPreviewURL
|
||||
|
||||
Reference in New Issue
Block a user