interpret hex sequences in ssid station names

resolves #917
This commit is contained in:
glaszig
2021-05-30 21:49:05 +01:00
parent f5a18b8d95
commit 92e154fa64
2 changed files with 8 additions and 0 deletions

View File

@@ -641,3 +641,10 @@ function validate_host($host) {
return preg_match('/^([a-z\d](-*[a-z\d])*)(\.([a-z\d](-*[a-z\d])*))*$/i', $host);
}
function evalHexSequence($string) {
$evaluator = function ($input) {
return hex2bin($input[1]);
};
return preg_replace_callback('/\\\x(..)/', $evaluator, $string);
}