XSS Protection in CodeIgniter — a practical guide to CodeIgniter XSS with clear examples you can reuse in real projects.
CodeIgniter Tutorial Series (57/74). Prefer one article? Read the complete CodeIgniter tutorial.
Short description
Escape everything you print in views with `esc()`. Do not trust raw HTML from users.
Escape output
<p><?= esc($userInput) ?></p>
<!-- Avoid unescaped user HTML unless sanitized intentionally -->