Skip to content

[5.x]: Hyphen/Dash is removed after saving the CSS class in LinkField #18201

@ayacoo

Description

@ayacoo

What happened?

Description

I have defined a field that uses the ‘Link’ type. There, I have activated the CSS class setting.

I want to save ‘button--download’ in the field. After saving, only ‘button-download’ appears there.

Image

Expected behavior

The CSS class ‘button--download’ remains unchanged.

Actual behavior

The CSS class ‘button--download’ is changed and saved as ‘button-download’.

Craft CMS version

5.8.21

PHP version

8.4.12

Operating system and version

No response

Database type and version

MySQL 8.0.40

Image driver and version

No response

Installed plugins and versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions