Update the rest of the PHP functions to use camelCase

This commit is contained in:
johnnyq
2026-07-23 17:39:06 -04:00
parent 3d94846a61
commit 9c65644adc
27 changed files with 121 additions and 198 deletions

View File

@@ -57,7 +57,7 @@ function toAlphanumeric($string)
return preg_replace('/[^A-Za-z0-9_-]/', '', $string);
}
function sanitize_url($url) {
function escapeUrl($url) {
$allowed = ['http', 'https', 'file', 'ftp', 'ftps', 'sftp', 'dav', 'webdav', 'caldav', 'carddav', 'ssh', 'telnet', 'smb', 'rdp', 'vnc', 'rustdesk', 'anydesk', 'connectwise', 'splashtop', 'sip', 'sips', 'ldap', 'ldaps'];
$parts = parse_url($url ?? '');
if (isset($parts['scheme']) && !in_array(strtolower($parts['scheme']), $allowed)) {