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

Add an option to only linkify URLs that start with a scheme #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hubgit
Copy link

@hubgit hubgit commented Dec 21, 2016

Adding a require_scheme option allows a user to disable auto-linking of things that look like URLs (e.g. www.example.com), so that only full URLs (e.g. https://www.example.com) are auto-linked. The scheme currently has to match ~^(ht|f)tps?://~.

Example usage:

$html = $linkify->processUrls($html, [
  'require_scheme' => true
]);

Adding a `require_scheme` option allows a user to disable auto-linking of `www.example.com`, so that only full URLs (e.g. `https://www.example.com` are auto-linked. The scheme currently has to match `~^(ht|f)tps?://~`.

Example usage:
```php
$html = $linkify->processUrls($html, [
  'require_scheme' => true
]);
```
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

Successfully merging this pull request may close these issues.

1 participant