From b84133da775286c542f78bc06b866d82574ceb36 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Wed, 29 Oct 2014 16:54:51 +0100 Subject: [PATCH] Unbreakable space should be also detected as valid for phone numbers (used by iOS to format contacts) --- coreapi/proxy.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/coreapi/proxy.c b/coreapi/proxy.c index 13fa6e048..7e0e35c8a 100644 --- a/coreapi/proxy.c +++ b/coreapi/proxy.c @@ -881,8 +881,11 @@ static bool_t is_a_phone_number(const char *username){ *p==')' || *p=='(' || *p=='/' || - *p=='+') continue; - else return FALSE; + *p=='+' || + (unsigned char)*p== 0xca // non-breakable space (iOS uses it to format contacts phone number) + ) + continue; + return FALSE; } return TRUE; }