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 67e86f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ 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)
tags_js=$(curl -sSL "$next_page")
grep -oP '(?<="name":").+?(?=")' <(echo $tags_js)
done
}

0 comments on commit 67e86f8

Please sign in to comment.