Skip to content

Create fieldset/collection/taxonomy/etc handle generation does not remove hyphens surrounded by spaces #8749

@godismyjudge95

Description

@godismyjudge95

Bug description

When creating a fieldset/collection/taxonomy it would be nice to be able to use hyphens in the title and not get this weird behavior:

image

How to reproduce

  1. Create a fieldset/collection/taxonomy
  2. Type a title that contains a hyphen in it like "Block - CTA"
  3. The handle defaults to a weird syntax "block_-_cta"

Logs

No response

Environment

Environment
Application Name: Dev Site
Laravel Version: 10.24.0
PHP Version: 8.1.21
Composer Version: 2.4.4
Environment: local
Debug Mode: ENABLED
URL: devsite.test
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Statamic
Addons: 7
Antlers: runtime
Stache Watcher: Enabled
Static Caching: Disabled
Version: 4.22.0 PRO

Statamic Addons
heidkaemper/statamic-toolbar: 1.1.0
jonassiewertsen/statamic-livewire: 2.12.0
mitydigital/statamic-google-fonts: 1.0.3
rias/statamic-address-field: 1.1.0
stillat/antlers-components: 2.1.0
webographen/statamic-widget-cache-controller: 1.0.2
webographen/statamic-widget-continue-editing: 1.1.0

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

None

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions