Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Troubles with cyrillic/utf8 tags #4

Closed
jakim opened this issue Mar 12, 2019 · 0 comments
Closed

Troubles with cyrillic/utf8 tags #4

jakim opened this issue Mar 12, 2019 · 0 comments

Comments

@jakim
Copy link
Owner

jakim commented Mar 12, 2019

From email:

Tried to use your IGmonitoring system for accounts with cyrillic/utf8
tags... and had some troubles - the system skips to auto-add any tags
which consist of non-latin characters.

Some research shows that problem is here:

vendor/jakim-pj/ig/src/Text.php

class Text
{

    public static $usernamesPattern =
'/(?:@)([A-Za-z0-9_](?:(?:[A-Za-z0-9_]|(?:\.(?!\.))){0,28}(?:[A-Za-z0-9_]))?)/i';
    public static $tagsPattern =
'/(?:#)([\p{L}0-9_](?:(?:[\p{L}0-9_]){0,28}(?:[\p{L}0-9_]))?)/i';

after change to

public static $tagsPattern = '/#(\w+)/u';

seems to work more correct...

@jakim jakim closed this as completed in c16cbe2 Jun 24, 2019
jakim added a commit that referenced this issue Jun 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant