diff --git a/src/wslview.sh b/src/wslview.sh index 9699ae16..1c26d494 100644 --- a/src/wslview.sh +++ b/src/wslview.sh @@ -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 diff --git a/tests/wslview.bats b/tests/wslview.bats index 99a1b297..f6a22285 100644 --- a/tests/wslview.bats +++ b/tests/wslview.bats @@ -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 ] +}