some fixes to directory keyword searches

This commit is contained in:
friendica 2013-09-14 17:20:24 -07:00
parent 7a3d415267
commit 053893b067
2 changed files with 5 additions and 3 deletions

View File

@ -1383,8 +1383,8 @@ function import_directory_profile($hash,$profile) {
foreach($profile['keywords'] as $kw) {
$kw = trim(htmlentities($kw,ENT_COMPAT,'UTF-8',false));
$kw = trim($kw,',');
$clean[] = $kw;
}
$clean[] = $kw;
}
$arr['xprof_keywords'] = implode(' ',$clean);

View File

@ -108,8 +108,10 @@ function zfinger_init(&$a) {
$k = explode(' ',$p[0]['keywords']);
if($k)
foreach($k as $kk)
if(trim($kk))
$tags[] = trim($kk);
if(trim($kk)) {
$tags[] = trim($kk," \t\n\r\0\x0B,");
}
}
if($tags)
$profile['keywords'] = $tags;
}