aboutsummaryrefslogtreecommitdiffstats
path: root/filters/colorize.c
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2024-07-29 00:06:47 +0200
committerRobin Jarry <robin@jarry.cc>2024-07-29 23:52:30 +0200
commit136a28ff46dd321c98afa8a9d62c5f12a41f09b2 (patch)
tree17585e2de23a0d6e9c1190faad789ac16236f70f /filters/colorize.c
parentf99bcc47df13178b132ae43352f3f8aa71c678fc (diff)
downloadaerc-136a28ff46dd321c98afa8a9d62c5f12a41f09b2.tar.gz
colorize: allow pipe '|' as uri character
Some HTML emails contain weird URLs that contain unescaped pipes '|'. For example: https://foo.baz.fr/?data=05|02|foo@bar.fr|1|0|Unknown|=|0|||&reserved=0 Sadly, this does not seem standard but there's probably not much we can do about it. Let's adapt colorize to also consider '|' as a valid URI character. Reported-by: Bence Ferdinandy <bence@ferdinandy.com> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Johannes Thyssen Tishman <johannes@thyssentishman.com>
Diffstat (limited to 'filters/colorize.c')
-rw-r--r--filters/colorize.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/filters/colorize.c b/filters/colorize.c
index 14150154..44e18f55 100644
--- a/filters/colorize.c
+++ b/filters/colorize.c
@@ -458,7 +458,7 @@ static inline bool isurichar(char c)
return false;
if (isalnum(c))
return true;
- if (strchr("-_.,~:;/?#@!$&%*+=\"'<>()[]", c) != NULL)
+ if (strchr("-_.,~:;/?#@!$&%*+=\"'|<>()[]", c) != NULL)
return true;
return false;
}