diff --git a/src/gallery/console/admin-server/library.php b/src/gallery/console/admin-server/library.php index 62da84c..c33b4df 100755 --- a/src/gallery/console/admin-server/library.php +++ b/src/gallery/console/admin-server/library.php @@ -194,7 +194,8 @@ function saveAccountsDb($db) { } function toUriCode($caption) { - return preg_replace("/\s+/", "-", trim(preg_replace("/[^a-z]/", " ", strtolower($caption)))); + // Turns a caption, like "Mona Lisa (1503)", into a URL safe string, like "mona-lisa-1503". + return preg_replace("/\s+/", "-", trim(preg_replace("/[^a-z0-9]/", " ", strtolower($caption)))); } function displayTrue($imageDb) {