Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In twitter_pull.module function twitter_pull_add_links($text) I replaced the hashtag pattern (the last one) with the following:
$pattern = '/[#]+([\pL\pN]+)/u';
See http://ca.php.net/manual/en/regexp.reference.unicode.php for more info. Basically, a hashtag is comprised of unicode letters and numbers. That includes é, ç, etc. Not including dashes since they're not linked by Twitter.
Comment | File | Size | Author |
---|---|---|---|
#3 | recognize_unicode_characters_1426490_3.patch | 977 bytes | Ruedische |
#1 | Screen Shot 2012-08-09 at 11.26.15.png | 13.92 KB | teelmo |
Comments
Comment #1
teelmo CreditAttribution: teelmo commentedYeah, this is a problem here in Finland also while we use scandic letters (Å, Ö and Ä) quite often.
See the attached screenshot. The whole hashtag "#keihäs" should be linked while now the anchor include only "#keih".
Comment #2
Ruedische CreditAttribution: Ruedische commentedPatch added.
Comment #3
Ruedische CreditAttribution: Ruedische commented