Skip to content

Commit 050ce55

Browse files
authored
Pass -g option to curl in linkchecker (#2842)
1 parent 26d0051 commit 050ce55

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
44
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
55

6+
## Unreleased
7+
8+
### Changed
9+
10+
* The `-g` is now passed to `curl` when checking links, to disable globbing, which could cause undesirable behavior when checking links containing characters like for example `[`, `{`, `&` or `?`. ([#2839], [#2842])
11+
612
## Version [v1.16.0] - 2025-11-14
713

814
### Added

src/docchecks.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ function _linkcheck_curl(method::Symbol, url::AbstractString; timeout::Real, use
321321
push!(headers, "-H")
322322
push!(headers, "Authorization: Bearer $(ENV["GITHUB_TOKEN"])")
323323
end
324-
return `curl $(method === :HEAD ? "-sI" : "-s") --proto =http,https,ftp,ftps $(headers) $(url) --max-time $timeout -o $null_file --write-out "%{http_code} %{url_effective} %{redirect_url}"`
324+
return `curl $(method === :HEAD ? "-sI" : "-s") --proto =http,https,ftp,ftps -g $(headers) $(url) --max-time $timeout -o $null_file --write-out "%{http_code} %{url_effective} %{redirect_url}"`
325325
end
326326

327327
# Automatic Pkg.add() GitHub remote check

test/online/online_linkcheck.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ server = HTTP.serve!(lincheck_server_handler, PORT)
3333
[Requires GITHUB_TOKEN](https://raw.githubusercontent.com/JuliaDocs/Documenter.jl/v1.0.0/Project.toml)
3434
[Does not support GITHUB_TOKEN](https://github.com/JuliaDocs/Documenter.jl/pulls)
3535
[May require GITHUB_TOKEN](https://github.com/JuliaDocs/Documenter.jl/pull/2729)
36+
37+
Use [`getindex`](https://docs.julialang.org/en/v1.12.1/base/arrays/#Base.getindex-Tuple{AbstractArray,%20Vararg{Any}}) to get one element of an array.
3638
"""
3739
)
3840
doc = Documenter.Document(; linkcheck = true, linkcheck_timeout = 20)

0 commit comments

Comments
 (0)