[wellwell-devel] [wellwell] Strip all strings to avoid display of pure whitespace strings with [address display].
Stefan Hornburg
wellwell-devel at rt.icdevgroup.org
Wed Sep 29 09:57:50 UTC 2010
commit ab8e8ba5d37189a3f65c62020c06f8143634126f
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date: Wed Sep 29 10:14:33 2010 +0200
Strip all strings to avoid display of pure whitespace strings with [address display].
code/address.tag | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/code/address.tag b/code/address.tag
index 179b9f1..1efadac 100644
--- a/code/address.tag
+++ b/code/address.tag
@@ -41,6 +41,13 @@ sub {
if ($address{country}) {
$address{country} = $Db{country}->field($address{country}, 'name');
}
+
+ # strip all strings to avoid display of pure whitespace strings
+ for (keys %address) {
+ $address{$_} =~ s/^\s+//;
+ $address{$_} =~ s/\s+$//;
+ }
+
return $Tag->uc_attr_list({hash => \%address, body => $body});
}
elsif ($function eq 'set') {
More information about the wellwell-devel
mailing list