PHPackages                             crocodile2u/safer-blitz - 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. crocodile2u/safer-blitz

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

crocodile2u/safer-blitz
=======================

1.1.1(8y ago)013PHP

Since Dec 22Pushed 8y ago1 watchersCompare

[ Source](https://github.com/crocodile2u/safer-blitz)[ Packagist](https://packagist.org/packages/crocodile2u/safer-blitz)[ RSS](/packages/crocodile2u-safer-blitz/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

safer-blitz
===========

[](#safer-blitz)

A small extension to [Blitz template engine](https://github.com/alexeyrybak/blitz), adding template inheritance and auto-escaping.

Template inheritance
--------------------

[](#template-inheritance)

**article.tpl**:

```
text
```

**layout.tpl**:

```

{{ raw(content) }}

```

**PHP code**:

```
$view = new View("article.tpl");
$view->extend("layout.tpl");
echo $view->parse();
```

**The output**:

```

text

```

Auto-escaping
-------------

[](#auto-escaping)

Initialize view:

```
$view = new \SaferBlitz\View;
```

In template:

```
{{ $some_variable }}

```

In controller:

```
$view->set(["some_variable" => "some nasty XSS attempt: \">alert(\"XSS\");"]);
$view->display();
```

Result:

```
some nasty XSS attempt: &quot;&gt;&lt;script&gt;alert(&quot;XSS&quot;);&lt;/script&gt;

```

To output variable unescaped, use *raw($var)* template API:

```
{{ raw($trusted_variable) }}

```

If anyone appears to be interested in this project, I will probably add proper escape methods to escape attributes, CSS, JS. For now, this is out of my personal scope of use though.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

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 ~203 days

Total

3

Last Release

3071d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1736820?v=4)[Victor Bolshov](/maintainers/crocodile2u)[@crocodile2u](https://github.com/crocodile2u)

---

Top Contributors

[![crocodile2u](https://avatars.githubusercontent.com/u/1736820?v=4)](https://github.com/crocodile2u "crocodile2u (8 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/crocodile2u-safer-blitz/health.svg)

```
[![Health](https://phpackages.com/badges/crocodile2u-safer-blitz/health.svg)](https://phpackages.com/packages/crocodile2u-safer-blitz)
```

###  Alternatives

[lendable/clock

Clock Abstraction

15278.8k](/packages/lendable-clock)[crumbls/layup

A visual page builder plugin for Filament 5 — Divi-style grid layouts with extensible widgets.

591.7k1](/packages/crumbls-layup)[alsatian/form-bundle

Symfony form types to extend built-in types. Ideal for Select2 AJAX implementations.

1424.6k](/packages/alsatian-form-bundle)

PHPackages © 2026

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