mirror of
https://github.com/rystaf/mlmym.git
synced 2024-11-23 22:03:01 +00:00
remove mailto links from title
This commit is contained in:
parent
c5a53c79da
commit
f5a423f2d5
|
@ -152,7 +152,7 @@ var funcMap = template.FuncMap{
|
|||
return body
|
||||
}
|
||||
text := html2text.HTML2TextWithOptions(buf.String(), html2text.WithLinksInnerText())
|
||||
re := regexp.MustCompile(`\<https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)\>`)
|
||||
re := regexp.MustCompile(`\<(https?:\/\/|mailto)(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)\>`)
|
||||
return re.ReplaceAllString(text, "")
|
||||
},
|
||||
"contains": strings.Contains,
|
||||
|
|
Loading…
Reference in a new issue