diff options
-rw-r--r-- | admin/include/functions_metadata.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/admin/include/functions_metadata.php b/admin/include/functions_metadata.php index 14d5a0d16..9dadd29d3 100644 --- a/admin/include/functions_metadata.php +++ b/admin/include/functions_metadata.php @@ -51,6 +51,15 @@ function get_sync_iptc_data($file) } } + if (isset($iptc['keywords'])) + { + // keywords separator is the comma, nothing else. Allowed characters in + // keywords : [A-Za-z0-9], "-" and "_". All other characters will be + // considered as separators + $iptc['keywords'] = preg_replace('/[^\w-]+/', ',', $iptc['keywords']); + $iptc['keywords'] = preg_replace('/^,+|,+$/', '', $iptc['keywords']); + } + return $iptc; } |