-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2825548
commit 0c67acf
Showing
1 changed file
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,26 @@ | ||
# PHP Confusable Homoglyphs | ||
> **NOTE** This project is currently a work in progress. | ||
<h1 align="center">Confusable Homoglyphs</h1> | ||
<p align="center"><em>A PHP port of <a href="https://github.com/vhf/confusable_homoglyphs">vhf/confusable_homoglyphs</a></em></p> | ||
|
||
A PHP port of https://github.com/vhf/confusable_homoglyphs | ||
<p align="center"> | ||
<a href="https://travis-ci.org/photogabble/php-confusable-homoglyphs"><img src="https://travis-ci.org/photogabble/php-confusable-homoglyphs.svg?branch=master" alt="Build Status"> | ||
<a href="https://packagist.org/packages/photogabble/php-confusable-homoglyphs"><img src="https://poser.pugx.org/photogabble/php-confusable-homoglyphs/v/stable.svg" alt="Latest Stable Version"></a> | ||
<a href="LICENSE"><img src="https://poser.pugx.org/photogabble/php-confusable-homoglyphs/license.svg" alt="License"></a> | ||
</p> | ||
|
||
## About this package | ||
|
||
> Unicode homoglyphs can be a nuisance on the web. Your most popular client, AlaskaJazz, might be upset to be impersonated by a trickster who deliberately chose the username ΑlaskaJazz. (The A is the greek letter [capital alpha](http://www.amp-what.com/unicode/search/%CE%91)) | ||
This is a complete port of the Python library [vhf/confusable_homoglyphs](https://github.com/vhf/confusable_homoglyphs) to PHP. I found myself needing its functionality after reading [this article](https://www.b-list.org/weblog/2018/feb/11/usernames/) by James Bennett on validating usernames and how [django-registration](https://github.com/ubernostrum/django-registration/blob/1d7d0f01a24b916977016c1d66823a5e4a33f2a0/registration/validators.py) does so. | ||
|
||
A huge thank you goes to the Python package creator [Victor Felder](https://github.com/vhf) and its contributors [Ryan Kilby](https://github.com/rpkilby) and [muusik](https://github.com/muusik); without their work this port would not exist. | ||
|
||
This library is compatible with PHP versions 7.0 and above. | ||
|
||
## Install | ||
|
||
Install this library with composer: `composer require photogabble/php-confusable-homoglyphs`. | ||
|
||
## Usage | ||
|
||
Please see the [tests](https://github.com/photogabble/php-confusable-homoglyphs/tree/master/tests) for detailed example of usage. |