From eba1f23023740c771569759c320c95b890ac33f9 Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Wed, 27 Mar 2024 00:23:07 -0700 Subject: [PATCH] mua: replace uriencode --- include/mua.sh | 48 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/include/mua.sh b/include/mua.sh index 8ca7556d..88bbcc94 100755 --- a/include/mua.sh +++ b/include/mua.sh @@ -86,21 +86,37 @@ test_pop3() "pop3s://$(uriencode $MUA_TEST_USER):$(uriencode MUA_TEST_PASS)@${MUA_TEST_HOST}/" } -# https://stackoverflow.com/questions/296536/how-to-urlencode-data-for-curl-command -# shellcheck disable=3005,3018,3024,3045,3057 uriencode() { - local string="${1}" - local strlen=${#string} - local encoded="" - local pos c o - - for (( pos=0 ; pos