From 44b6c52ac342b1bc75ca565c3787e0b963259476 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Fri, 14 Apr 2023 17:43:15 +0200 Subject: colorize: support email domains that start/end with digits According to RFC 1123: "... a host domain name is now allowed to begin with a digit and could legally be entirely numeric ..." Link: https://datatracker.ietf.org/doc/html/rfc1123#section-2 Cc: Nicolas Dichtel Signed-off-by: Robin Jarry Reviewed-by: Bence Ferdinandy --- filters/colorize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'filters') diff --git a/filters/colorize.c b/filters/colorize.c index 51bcdbe9..5122b241 100644 --- a/filters/colorize.c +++ b/filters/colorize.c @@ -457,7 +457,7 @@ static inline bool isurichar(char c) #define URL_RE \ "([a-z]{2,8})://" \ - "|(mailto:)?[[:alnum:]_+.~/-]*[[:alnum:]]@[a-z][[:alnum:].-]*[a-z]" + "|(mailto:)?[[:alnum:]_+.~/-]*[[:alnum:]]@[[:alnum:]][[:alnum:].-]*[[:alnum:]]" static regex_t url_re; static void urls(const char *in, struct style *ctx) -- cgit