Table of Contents

tests/unit/PrivacyPolicySanitizationTest.php

Source: tests/unit/PrivacyPolicySanitizationTest.php · 122 lines, ~456 statements · namespace: (global) · `declare(strict_types=1)`: no


Unit tests for the privacy-policy sanitization pipeline (R5).

The privacy policy content is rich HTML (h2/p/ul/li/strong) so it must be sanitized on save with HTMLPurifier (purify_dirty_html) and again on the public page with an htmLawed whitelist, while the admin textarea escapes the stored markup via escape_html(). These tests assert that stored XSS payloads are neutralised at every stage and that legitimate markup is kept.

Imports

Alias Fully-qualified name
TestCase PHPUnit\Framework\TestCase

Types declared here


Generated by 'tools/gendoc'.