Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

URL-friendly options

1,900 sites Security covered Drupal 10–11
View on drupal.org

This module ensures that option list fields use URL-friendly keys, meaning only letters, numbers, and hyphens are allowed. This makes it easier to use these fields in views as contextual filters. The module does not modify existing values but prevents the addition of new options with invalid keys.

This module enforces that all option list fields have keys that are composed only of alpha-numeric characters and hyphens.

For example the list below is a valid list:

first-value|First value
second-value|Second value

While this list isn't allowed:

first_value|First value
second value!|Second value!

This means that if you end up needing to use this field as a contextual filter in a view, the keys are already URL-friendly.

Notes

1) This module will not change existing values. However, it won't be possible to add new values to the list if there are non-compliant pre-existing keys, since the form won't validate. A status report message will display an error if there are any keys that fail validation.

2) If there are exceptions that need to bypass this module's validation, developers can implement hook_url_friendly_options_bypass_field_validation() and mark a particular field to be skipped.

Depends on

Dependencies of the latest stable release

  • options Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
May 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 3
Maintenance
Dormant

Release Timeline

Releases

Version Type Core Release date
2.0.1 Stable 10–11 Jun 5, 2025
2.0.0 Stable 10–11 May 28, 2025
2.0.x-dev Dev 10–11 May 24, 2025