Skip to content

Commit

Permalink
Escape \u0026 (&) in URL
Browse files Browse the repository at this point in the history
  • Loading branch information
taoky committed Jan 22, 2024
1 parent 5e8699e commit 5c1e804
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ docker-tags(){
image=library/$1
tags_js=$(curl -sSL "https://registry.hub.docker.com/v2/repositories/${image}/tags/")
grep -oP '(?<="name":").+?(?=")' <(echo $tags_js)
while next_page=$(grep -oP '(?<="next":").+?(?=")' <(echo $tags_js) )
while next_page=$(grep -oP '(?<="next":").+?(?=")' <(echo $tags_js) | sed 's/\\u0026/\&/' )
do
tags_js=$(curl -sSL $next_page)
grep -oP '(?<="name":").+?(?=")' <(echo $tags_js)
Expand Down

0 comments on commit 5c1e804

Please sign in to comment.