twitter-archive / twitter-text-objc

An Objective-C implementation of Twitter's text processing library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid URL with cyrillic path

RomanTruba opened this issue · comments

Example of URL: http://juju.su/news/22/конец-пиратству/
Parsing result: http://juju.su/news/22/
Possible fix:

#define TWUValidGeneralURLPathChars     @"[a-zA-Z0-9!\\*';:=+,.$/%#\\[\\]\\-_~&|@" TWULatinAccents TWUCyrillicHashtagChars @"]"
#define TWUValidURLPathEndingChars      @"[a-zA-Z0-9=_#/+\\-" TWULatinAccents TWUCyrillicHashtagChars @"]|(?:" TWUValidURLBalancedParens @")"