Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Safeword

Security covered Maintenance fixes only 246 sites

Safeword provides a field type that stores a human-readable name and a machine-readable name. This is useful for generating URL aliases, views arguments, and more, allowing users to edit only a portion of a path while keeping other parts safe.

It's often useful to provide two versions of user input - one that's intended for human viewing and another that's for use in database queries, URLs, and so on. In Drupal, this is generally known as a 'Name' and 'Machine name' pair. Drupal even provides a FormAPI element to simplify the process of entering these matched pairs.

Safeword provides a custom field type that stores two strings using the name/machine name approach. It can be useful when generating PathAuto aliases, exposing Views arguments, and so on.

One common use is to not give users permission to 'Create and edit URL aliases' and instead give them access to a Safeword field which uses the node title as it's source. So that users can only edit a limited part of the path, keeping safe the other parts that your site features may rely on.

Features

Can use the node Title or taxonomy term name field as the source of the machine name.

Can provide it's own text field as the source of the machine name.

Machine name field is shown next to the source field, clicking 'Edit' makes the machine name editable in it's own field.

Option to show a live preview of the full path to the node or term while the machine name part of it is being edited.

Option to require machine names to be unique per content type or vocabulary.

Option to convert accented characters like øéåî to Roman letter equivalents, uses integration with the Transliteration module.

Can remove HTML intelligently without leaving 'p', 'div', etc. in the machine name.

Similar Modules

Machine Name

Machine Name module adds a field type into which the user enters a machine name, it's main function is to validate that the input conforms to the machine name format.

Safeword module is different to Machine Name module as it provides a standard text field and when text is input displays a matching machine name field which automatically converts the text into a machine name formatted version, which can also be hand edited.

Drupal 11 · not 10

Ask your assistant about Safeword

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • field Drupal core
  • text Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Jul 2026
Latest release
2 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Core PHP Release date
2.0.1 Stable 11 Jul 25, 2026
2.0.x-dev Dev 11 Jul 25, 2026