Escape underscores in user list
This commit is contained in:
parent
4c5966d48d
commit
bc28109cf1
3
users.sh
3
users.sh
|
@ -8,7 +8,8 @@ do
|
|||
if [ "$(stat -c %G "/home/$user")" == "deleted" ];then
|
||||
echo "<del>~$user</del> ";
|
||||
else if [ "$(stat -c %G "/home/$user")" != "banned" ];then
|
||||
echo "[~$user](/~$user) ";
|
||||
# Escape underscores (note that username is '[a-z][-0-9a-z_]{2,}')
|
||||
echo "[~${user//_/\\_}](/~$user) ";
|
||||
else
|
||||
echo "~$user ([banned](banned.html#$user)) ";
|
||||
fi;fi
|
||||
|
|
Loading…
Reference in New Issue