mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 23:09:26 -05:00
fixed thumbnail urlencode for file names with (,),*
matched output of urlencode with gio info "/home/su/Pictures/Wallpapers/as()*[].png" | grep "uri:" uri: file:///home/su/Pictures/Wallpapers/as()*%5B%5D.png
This commit is contained in:
@@ -36,7 +36,7 @@ urlencode() {
|
||||
for ((i=0; i<${#str}; i++)); do
|
||||
c="${str:$i:1}"
|
||||
case "$c" in
|
||||
[a-zA-Z0-9.~_-]|/) encoded+="$c" ;;
|
||||
[a-zA-Z0-9.~_-]|/|'('|')'|'*') encoded+="$c" ;;
|
||||
*) printf -v hex '%%%02X' "'${c}'"; encoded+="$hex" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user