From 5abf5f9adfe717e2b5f85e4bd145c2d5d15ff37c Mon Sep 17 00:00:00 2001 From: morgane Date: Sun, 21 Jun 2026 15:30:02 +0000 Subject: [PATCH] Actualiser api/index.php --- api/index.php | 1 + 1 file changed, 1 insertion(+) diff --git a/api/index.php b/api/index.php index f1144da..d534a9b 100644 --- a/api/index.php +++ b/api/index.php @@ -12100,6 +12100,7 @@ function locationsAdd(PDO $db): void { // Generate a safe key from the label (slug-like, ASCII-only) $key = mb_strtolower(trim($label)); + $key = strtr($key, ['à'=>'a','â'=>'a','ä'=>'a','é'=>'e','è'=>'e','ê'=>'e','ë'=>'e','ï'=>'i','î'=>'i','ô'=>'o','ö'=>'o','ù'=>'u','û'=>'u','ü'=>'u','ç'=>'c','œ'=>'oe','æ'=>'ae']); $key = preg_replace('/[^a-z0-9]+/u', '_', $key); $key = trim($key, '_'); if ($key === '') {