diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2014-02-05 15:39:30 +0200 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2014-02-05 17:12:12 +0200 |
commit | cb9fa195154fb4e1732892131766278fdb028a1a (patch) | |
tree | e551d11098e155357d87c3515e0ad1b7ab8fa1ac | |
parent | 32c09a1952a15df9bf7b6b93698fb882c05b1438 (diff) | |
download | aiaiai-cb9fa195154fb4e1732892131766278fdb028a1a.tar.gz |
email-sh-functions: fix e-mail addresses processing
This patch is a bug-fix. It fixes the 'strip_address()' and 'merge_addresses()'
which were for some reason removing all the blanks from the list of addresses.
The result was that "Artem Bityutskiy" became "ArtemBityutskiy".
Instead of removing all blanks, it is supposed to make multiple blanks to
become a single white-space.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-rw-r--r-- | email/aiaiai-email-sh-functions | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/email/aiaiai-email-sh-functions b/email/aiaiai-email-sh-functions index 01acc9d..5474577 100644 --- a/email/aiaiai-email-sh-functions +++ b/email/aiaiai-email-sh-functions @@ -76,7 +76,7 @@ strip_address() # address is equivalent to the local+xyz@domain address. printf "%s" "$list" | LC_ALL=C sed -e "s/[^,]*$l+\{0,1\}[^@]*@$d[^,]*//g" \ -e "s/,,/,/g" -e "s/^,//" -e "s/,$//" \ - -e "s/[[:blank:]]\+//g" + -e "s/[[:blank:]]\+/ /g" } # Fetch project name from a list of e-mail address. The project is specified like @@ -109,7 +109,7 @@ merge_addresses() local list="$(printf "%s" "$addr1,$addr2" | LC_ALL=C tr -d "\n")" printf "%s" "$list" | LC_ALL=C sed -e "s/,,/,/g" -e "s/^,//" \ - -e "s/,$//" -e "s/[[:blank:]]\+//g" + -e "s/,$//" -e "s/[[:blank:]]\+/ /g" } # A helper function for 'ini_config_get()' (from libshell) which fails when |