Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arabic / Persian bug #366

Closed
pajuhaan opened this issue Jun 9, 2020 · 2 comments
Closed

Arabic / Persian bug #366

pajuhaan opened this issue Jun 9, 2020 · 2 comments

Comments

@pajuhaan
Copy link

pajuhaan commented Jun 9, 2020

This function removes all pure Persian and Arabic characters:
function clean(string $value, bool $allowHTML = false): ?string
{
$value = trim($value);

**//Ignore empty texts or with no regular characters
if ($value === '' || !preg_match('/\w/', $value)) {
    return null;
}**
@pajuhaan pajuhaan changed the title Arabic / Persion bug Arabic / Persian bug Jun 9, 2020
@oscarotero
Copy link
Owner

Thanks for notify this.
The purpose of this function is avoid values like -- that I found in some cases but I can remove it, unless there's another way to detect regular characters of any alphabet. Any idea?

@oscarotero
Copy link
Owner

Fixed in 4.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants