From: x2003bruneau Date: Fri, 18 Aug 2006 10:44:08 +0000 (+0000) Subject: Fix address parasitic indentation in vcards X-Git-Tag: xorg/0.9.11~97 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=dbd667bc8b2f042e444e7504bc72d08074e3f0f8;p=platal.git Fix address parasitic indentation in vcards git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@819 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/modules/profile.php b/modules/profile.php index 14f2250..6e8479f 100644 --- a/modules/profile.php +++ b/modules/profile.php @@ -646,10 +646,11 @@ class ProfileModule extends PLModule { // $adr1, $adr2, $adr3, $postcode, $city, $region, $country extract($params['adr']); - $adr = $adr1; + $adr = trim($adr1); $adr = trim("$adr\n$adr2"); $adr = trim("$adr\n$adr3"); - return quoted_printable_encode(";;$adr;$city;$region;$postcode;$country"); + $adr = explode("\n", quoted_printable_encode(";;$adr;$city;$region;$postcode;$country")); + return implode("\n", array_map('trim', $adr)); } function handler_vcard(&$page, $x = null)