Files

21 lines
880 B
PHP

<?php
/*
* Reflector Dashboard — web front-end for SvxReflector
* Copyright (C) 2026 SA7AUX (Björn)
* SPDX-License-Identifier: AGPL-3.0-or-later
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version. See the LICENSE file for details.
*/
declare(strict_types=1);
// html.php — shared PHP helper for every web (dmr-web, svx-web, svxlink-web).
// Canonical copy: <dmr-portal>/auth/lib/html.php; other repos carry a COPY.
// HTML escaping for server-rendered pages.
// Escape for HTML text and attribute context (quotes included, invalid UTF-8 replaced).
function h(?string $s): string {
return htmlspecialchars((string)$s, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
}