Navigation Menu

Skip to content

Commit

Permalink
merge -r1484:1485 from branch 1.6 to trunk (bug 481: Incorrect tag ge…
Browse files Browse the repository at this point in the history
…neration

in listing.xml for accentuated letters)

git-svn-id: http://piwigo.org/svn/trunk@1486 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
rvelices committed Jul 20, 2006
1 parent 27aeab9 commit d44aa8a
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions tools/create_listing_file.php
Expand Up @@ -136,7 +136,7 @@ function clean_iptc_value($value)
// remove binary nulls
$value = str_replace(chr(0x00), ' ', $value);

return htmlentities($value);
return $value;
}

function get_sync_iptc_data($file)
Expand All @@ -154,17 +154,18 @@ function get_sync_iptc_data($file)
{
if ( preg_match('/(\d{4})(\d{2})(\d{2})/', $value, $matches))
{
$iptc[$pwg_key] = $matches[1].'-'.$matches[2].'-'.$matches[3];
$value = $matches[1].'-'.$matches[2].'-'.$matches[3];
}
}
if ($pwg_key == 'keywords')
{
// official keywords separator is the comma
$value = preg_replace('/[.;]/', ',', $value);
$value = preg_replace('/^,+|,+$/', '', $value);
}
$iptc[$pwg_key] = htmlentities($value);
}

if (isset($iptc['keywords']))
{
// official keywords separator is the comma
$iptc['keywords'] = preg_replace('/[.;]/', ',', $iptc['keywords']);
$iptc['keywords'] = preg_replace('/^,+|,+$/', '', $iptc['keywords']);
}
$iptc['keywords'] = implode(
',',
array_unique(
Expand Down

0 comments on commit d44aa8a

Please sign in to comment.