Dick_Kalkman
Member
Posted 10 months ago #
I found a problem / bug with the linkification of twitter #hashtags, that contain one or more special characters.
Example: #Utøya (Norwegian)
The solution might be changing the regex, so that it also selects a broad range of special foreign language characters.
A nice list of foreign language characters ca be found on:
http://www.vistawide.com/languages/typing_foreign_language_characters.htm
Best Regards, Dick
Dick_Kalkman
Member
Posted 10 months ago #
This regex might solve 2 problems:
1. The 'hyphen problem' in hashtags;
2. The 'foreign language characters problem' in hashtags.
'/(^|\s)#([\-\pL\w]+)/u'
In the code:
$msg = preg_replace('/(^|\s)#([\-\pL\w]+)/u', "$1#$2$3 ", $msg);
So hashtags like #hour-s and #Utøya are so far now linkified.
Best Regards, Dick
Hi Dick,
the 1.2.1 release fixes the bug you reported.
Thanks for your cooperation!