aboutsummaryrefslogtreecommitdiffstats
path: root/include/Scrape.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/Scrape.php')
-rwxr-xr-xinclude/Scrape.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/Scrape.php b/include/Scrape.php
index 52405ae2d..e98978f38 100755
--- a/include/Scrape.php
+++ b/include/Scrape.php
@@ -445,10 +445,19 @@ function probe_url($url, $mode = PROBE_NORMAL) {
$adr = imap_rfc822_parse_adrlist($x->to,'');
if(isset($adr)) {
foreach($adr as $feadr) {
- if((strcasecmp($feadr->mailbox,$name) == 0)
- &&(strcasecmp($feadr->host,$phost) == 0)
+ if((strcasecmp($feadr->mailbox,$name) == 0)
+ &&(strcasecmp($feadr->host,$phost) == 0)
&& (strlen($feadr->personal))) {
- $vcard['fn'] = notags($feadr->personal);
+
+ $personal = imap_mime_header_decode($feadr->personal);
+ $vcard['fn'] = "";
+ foreach($personal as $perspart)
+ if ($perspart->charset != "default")
+ $vcard['fn'] .= iconv($perspart->charset, 'UTF-8//IGNORE', $perspart->text);
+ else
+ $vcard['fn'] .= $perspart->text;
+
+ $vcard['fn'] = notags($vcard['fn']);
}
}
}