diff --git a/lib/md_tools.sh b/lib/md_tools.sh index 930b021..2a1be48 100755 --- a/lib/md_tools.sh +++ b/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 -####################################################################### -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 -}