Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:tests:privacypolicysanitizationtest

This is an old revision of the document!


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'.

scriptlog/tests/privacypolicysanitizationtest.1790413765.txt.gz · Last modified: by admin