Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove deprecated function
Tom Scavo committed May 16, 2017
1 parent b1fb553 commit 3e9d5d7
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions lib/md_tools.sh
@@ -741,29 +741,3 @@ listEndpointLocations () {
# cut the location column
/bin/cat - | $_CUT -f4 -d" "
}

#######################################################################
# This function is DEPRECATED. Use percent_encode instead.
#
# URL-encode an arbitrary string.
# See: https://gist.github.com/cdown/1163649
#
# Usage: urlencode <string>
#######################################################################
urlencode () {

# make sure there is one (and only one) command-line argument
if [ $# -ne 1 ]; then
echo "ERROR: $FUNCNAME: incorrect number of arguments: $# (1 required)" >&2
return 2
fi

local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:i:1}"
case "$c" in
[a-zA-Z0-9.~_-]) printf "$c" ;;
*) printf '%%%02X' "'$c"
esac
done
}

0 comments on commit 3e9d5d7

Please sign in to comment.