Drupal is a registered trademark of Dries Buytaert
seven 2.0.0-beta6 New beta version released for theme seven (2.0.0-beta6). seven 1.0.1-beta1 First beta version released for theme seven (1.0.1-beta1). raven 7.3.7 Minor update available for module raven (7.3.7). user_reference_invite 1.3.1 Minor update available for module user_reference_invite (1.3.1). user_reference_invite 1.3.0 Minor update available for module user_reference_invite (1.3.0). flowdrop_ui 1.3.0 Minor update available for module flowdrop_ui (1.3.0). flowdrop_ai_provider 1.0.1 Minor update available for module flowdrop_ai_provider (1.0.1). cloudfront_cache_path_invalidate 4.1.2 Minor update available for module cloudfront_cache_path_invalidate (4.1.2). ckeditor5_bootstrap 1.0.1 Minor update available for module ckeditor5_bootstrap (1.0.1). site_template_helper 1.0.2 Minor update available for module site_template_helper (1.0.2). modal_page 6.0.0-beta13 New beta version released for module modal_page (6.0.0-beta13). module_builder 4.2.2 Minor update available for module module_builder (4.2.2). universal_file_utils 3.0.0-beta3 New beta version released for module universal_file_utils (3.0.0-beta3). one_page_crm_api 1.0.0-beta2 New beta version released for module one_page_crm_api (1.0.0-beta2). one_page_crm_api 1.0.0-beta1 First beta version released for module one_page_crm_api (1.0.0-beta1). accesstools 2.0.0 Module accesstools updated after 10 months of inactivity (2.0.0). pulse_theme New module pulse_theme appeared in the Drupal ecosystem. search_api_page New module search_api_page appeared in the Drupal ecosystem. google_image_sitemap New module google_image_sitemap appeared in the Drupal ecosystem. user_visits New module user_visits appeared in the Drupal ecosystem.

AI Text Cleaner

AI Text Cleaner is a small Drupal module that provides a text filter and a Drush command to clean formatting quirks from ChatGPT or other LLM outputs.
It removes hidden or problematic characters, converts non-breaking spaces, normalizes dashes and quotes, converts ellipses, and strips Markdown-style headings and stray asterisks.

Features

  • Text filter plugin that can be enabled on input formats to clean content on save.
  • Options supported:
    • Remove hidden/control characters
    • Convert non-breaking spaces to regular spaces
    • Normalize dashes (hyphen/en dash/em dash) to a standard hyphen
    • Normalize quotes (curly “smart” quotes → straight quotes)
    • Convert ellipses (…) to three periods (...)
    • Remove trailing whitespace
    • Remove stray asterisks and stray list artifacts
    • Strip Markdown-style headings (leading # characters)
  • Drush command ai:text-clean (alias ai-text-clean) to run the cleaner across nodes in bulk.
  • Per-option statistics exported for reporting or CSV-like table output.
  • Analysis mode (dry run) that reports what would change without saving.
  • Ability to limit by content type (bundle), language, and maximum node count.

Dependencies

  • Drupal core (module developed for Drupal 11)
  • PHP 8.1 or newer
  • Optional: Drush (to use the ai:text-clean command)
  • Filter system: integrates with Drupal's core filter subsystem (ensure input formats are configured).

Installation

  1. Place the module in web/modules/custom/ai_text_cleaner.
  2. Enable the module (example using Drush):
drush en ai_text_cleaner -y

To automatically apply the filter, go to Configuration → Text formats and editors, edit the target input format, and enable the "AI Text Cleaner" filter at the desired weight.

Usage with Drush

Analyze (dry run) all nodes of type article:

drush ai:text-clean --types=article --analysis=TRUE

Apply cleaning and save changes for up to 50 nodes across all languages:

drush ai:text-clean --limit=50 --analysis=FALSE

You can supply multiple content types or languages as comma-separated lists, for example --types=article,page or --languages=en,de.

Activity

Total releases
2
First release
Mar 2026
Latest release
2 days ago
Release cadence
0 days
Stability
100% stable

Releases

Version Type Release date
1.0.1 Stable Mar 14, 2026
1.0.0 Stable Mar 14, 2026