diff options
author | Jordan <me@jordan.im> | 2022-12-05 14:32:25 -0700 |
---|---|---|
committer | Jordan <me@jordan.im> | 2022-12-05 14:32:25 -0700 |
commit | ae94a4a9cfe21b07e2235022d634c39b602e5c87 (patch) | |
tree | 023fd351bf6b53066df6623361e2ef5bbb9d23e9 | |
parent | a0f1cd2613f6483a375cb2ea4086f7ebb0212d64 (diff) | |
download | keep-ae94a4a9cfe21b07e2235022d634c39b602e5c87.tar.gz keep-ae94a4a9cfe21b07e2235022d634c39b602e5c87.zip |
keep: rm marks more likely to be punctuating than valid URL components
-rw-r--r-- | keep.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -199,6 +199,10 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) { purell.FlagRemoveFragment| purell.FlagSortQuery) + // In this context, leading/trailing dots are more commonly punctuating + // and generate invalid URLs if preserved + uStr = strings.Trim(uStr, ".") + // Ensure host is not present in ignoreList set if isIgnored(config.Ignore, uStr) { continue |