[9.0.16] pageId fix

This commit is contained in:
Fred 2019-04-02 09:22:46 +02:00 committed by GitHub
parent 70b0388852
commit b74c86dfcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -1442,6 +1442,10 @@ class helper {
$text
));
$text = preg_replace('/([^a-z0-9-])/', '', $text);
// Cas où un identifiant est vide
if (empty($text)) {
$text = uniqid('page-');
}
// Un ID ne peut pas être un entier, pour éviter les conflits avec le système de pagination
if(intval($text) !== 0) {
$text = 'i' . $text;
@ -2866,4 +2870,4 @@ class template {
// Retourne le html
return $html;
}
}
}