summaryrefslogtree/nfs/website.git//.wiki commitdiff
path: root/src/web/helpers/sanitize.php
blob: 495c249dbd0ac11406e8224ea2c3f62fdd6f8ac9 (plain)
1
2
3
4
5
6
7
8
<?php /* Copyright (c) 2024 Freya Murphy */

function esc(string $data): string {
	$data = str_replace('&', '&amp;', $data);
	$data = str_replace('<', '&lt;', $data);
	$data = str_replace('>', '&gt;', $data);
	return $data;
}