Fix display of non-ASCII SSID

This commit is contained in:
zbchristian 2021-08-18 22:10:33 +02:00 committed by billz
parent db9f76eb5c
commit c33cf5f81a
2 changed files with 3 additions and 3 deletions

View file

@ -14,6 +14,7 @@ knownWifiStations($networks);
nearbyWifiStations($networks, !isset($_REQUEST["refresh"]));
connectedWifiStations($networks);
sortNetworksByRSSI($networks);
foreach ($networks as $ssid => $network) $networks[$ssid]["ssidutf8"] = ssid2utf8( $ssid );
$connected = array_filter($networks, function($n) { return $n['connected']; } );
$known = array_filter($networks, function($n) { return !$n['connected'] && $n['configured']; } );

View file

@ -3,9 +3,8 @@
<input type="hidden" name="ssid<?php echo $index ?>" value="<?php echo htmlentities($network['ssid'], ENT_QUOTES) ?>" />
<?php if (strlen($network['ssid']) == 0) {
$network['ssid'] = "(unknown)";
} ?>
<h5 class="card-title"><?php echo htmlspecialchars($network['ssid'], ENT_QUOTES); ?></h5>
} ?>
<h5 class="card-title"><?php echo htmlspecialchars($network['ssidutf8'], ENT_QUOTES); ?></h5>
<div class="info-item-wifi"><?php echo _("Status"); ?></div>
<div>
<?php if ($network['configured']) { ?>