Trimmed tag name

This commit is contained in:
miguel angel rasteu 2023-04-18 12:51:12 +02:00
parent 2387cbd352
commit 4a250fc7c0
1 changed files with 4 additions and 3 deletions

View File

@ -121,13 +121,14 @@ if ($update_tag && $id_tag != 0) {
);
}
// Create tag: creates a new tag
// Create tag: creates a new tag.
if ($create_tag) {
$return_create = true;
// Erase comma characters on tag name
// Erase comma characters and spaces on tag name.
$name_tag = str_replace(',', '', $name_tag);
hd($name_tag, true);
$name_tag = str_replace(' ', '', $name_tag);
$data = [];
$data['name'] = $name_tag;
$data['description'] = $description_tag;