PHPackages                             nexuslinkservices/external-link-purifier - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nexuslinkservices/external-link-purifier

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nexuslinkservices/external-link-purifier
========================================

v1.2.2(9y ago)039MITPHPPHP &gt;=5.6.2

Since Aug 23Pushed 9y ago1 watchersCompare

[ Source](https://github.com/nexuslinkservices/external-link-purifier)[ Packagist](https://packagist.org/packages/nexuslinkservices/external-link-purifier)[ RSS](/packages/nexuslinkservices-external-link-purifier/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (2)Versions (6)Used By (0)

HOW TO USE - GUIDE:
===================

[](#how-to-use---guide)

Define true/false value to purify external or all links as per your need

[![Latest Version](https://camo.githubusercontent.com/a5aa90600379a97c28f1034b80fcf90938f8b2f11f2f630fac0514890f265991/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e657875736c696e6b73657276696365732f65787465726e616c2d6c696e6b2d70757269666965722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nexuslinkservices/external-link-purifier)[![Software License](https://camo.githubusercontent.com/30597ff9a350144f03bffdd9183e16468e0b3ca1193e1d08591d992622738d55/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/c0fc876f0cf7929194ce9f7dd7ec53960034931d4b65d8397de9fa7f779d32b3/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e657875736c696e6b73657276696365732f65787465726e616c2d6c696e6b2d70757269666965722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/nexuslinkservices/external-link-purifier/?branch=master)[![Build Status](https://camo.githubusercontent.com/5048e6246d023e03c28b5e35080f0980936931f2c735d6bd35ebcd7defc259dc/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e657875736c696e6b73657276696365732f65787465726e616c2d6c696e6b2d70757269666965722f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/nexuslinkservices/external-link-purifier/build-status/master)

Installation
------------

[](#installation)

If you use composer, you can add this package by running

```
composer require galiteintechnologies/external-link-purifier

```

Usage
-----

[](#usage)

i.e.: I want to remove external links from my content, so I need to define following variables in my configuration yaml file.

```
external_link:
    purify: true

```

```
Note(s):
1. If configuration yaml is not there in your project then the default configuration will be taken into consideration.
2. The bundle uses symfony yaml component to parse the yaml configuration.

```

Following is the reference code to make it working,

```
/**
 * CODE

 * create a new object of LinkPurifier class
 * call purify method with 3 arguments
 * $content to purify links
 * $domain keep links of this domain and remove other external links (optional), If not specified remove all links
 * $purify true/false (optional)
 */

$linkPurifier = new LinkPurifier($pathToYaml);  //$pathToYaml is optional as mentioned earlier
$filteredContent = $linkPurifier->Purify($contentToBePurifyForLinks, $domainToKeep, $purify);

```

That's it with the bundle.

CONTRIBUTING:
-------------

[](#contributing)

Pull requests are always welcome.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

5

Last Release

3591d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cbc59f0df20be1c44e7b28f8240738d509d17a58be4b3a7c5061cb9349099411?d=identicon)[galiteintechnologies](/maintainers/galiteintechnologies)

---

Top Contributors

[![galiteintechnologies](https://avatars.githubusercontent.com/u/20535840?v=4)](https://github.com/galiteintechnologies "galiteintechnologies (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nexuslinkservices-external-link-purifier/health.svg)

```
[![Health](https://phpackages.com/badges/nexuslinkservices-external-link-purifier/health.svg)](https://phpackages.com/packages/nexuslinkservices-external-link-purifier)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
