Skip to content

Latest commit

 

History

History

README.md

initphp/escaper — Documentation

This directory is the developer reference for initphp/escaper. The top-level README is intentionally short; everything in depth lives here.

Index

  1. Getting started — install, first call, the Esc facade vs. instantiating Escaper.
  2. Per-context guides — one file per output context, with the rules the escaper applies, the threats it defeats, and runnable examples:
  3. Encodings — non-UTF-8 input/output, the supported list and how conversion is performed.
  4. Exceptions — the exception tree and when each one is thrown.
  5. Security notes — caveats, common misuses, and pointers to authoritative sources.

Conventions used in these docs

  • Code samples assume the autoloader has already been required.
  • Output shown in // comments is the literal string the escaper returns. Each sample was generated by running the escaper itself, not hand-written.
  • "Untrusted" means any data that has touched the network, the filesystem, a database, or anything else outside your PHP process — in other words, "almost everything".