Skip to content

Commit

Permalink
Merge pull request #287 from miduddin/dev/master
Browse files Browse the repository at this point in the history
wslview: fix opening links with brackets
  • Loading branch information
patrick330602 authored Oct 2, 2023
2 parents 9cd1fc4 + db7c574 commit 0339c25
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/wslview.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function add_reg_alt {
}

function url_validator {
content=$(curl --head --silent "$*" | head -n 1)
content=$(curl --head --silent -g "$*" | head -n 1)
if [ -n "$content" ]; then
return 0
else
Expand Down
5 changes: 5 additions & 0 deletions tests/wslview.bats
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,8 @@ setup() {
run out/wslview "https://wslutiliti.es/"
[ "$status" -eq 0 ]
}

@test "wslview - Internet - with brackets" {
run out/wslview "https://www.duckduckgo.com/?q=[wslu]"
[ "$status" -eq 0 ]
}

0 comments on commit 0339c25

Please sign in to comment.