aboutsummaryrefslogtreecommitdiffstats
path: root/tools/create_listing_file.php
diff options
context:
space:
mode:
Diffstat (limited to 'tools/create_listing_file.php')
-rw-r--r--tools/create_listing_file.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/create_listing_file.php b/tools/create_listing_file.php
index e0de87a88..c0935fb6b 100644
--- a/tools/create_listing_file.php
+++ b/tools/create_listing_file.php
@@ -127,6 +127,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;
}