Skip to content

Releases: backdrop-contrib/acuity_text_formatter

1.x-1.3.1

Choose a tag to compare

@albanycomputers albanycomputers released this 29 Jul 10:07

What's Changed

  • Fix PHP 8 by-reference warning on every entity and node save by @albanycomputers in #7
  • Remove redundant maintainers line and generalise AI credit by @albanycomputers in #8
  • Fix default config: add capitalize_after_newline, drop unused collapse_spaces by @albanycomputers in #11

Full Changelog: 1.x-1.3.0...1.x-1.3.1

1.x-1.3.0

Choose a tag to compare

@albanycomputers albanycomputers released this 02 May 13:22

🚀 Text Formatter (Acuity Utils) 1.x-1.3.0

This release is a major upgrade that expands the module from node-only formatting to a full entity-wide text normalisation system, with new support for user accounts, node titles, and improved data-cleaning controls.


✨ Highlights

🔹 Entity-wide formatting

Text formatting now works across all fieldable entities using hook_entity_presave(), not just nodes.

🔹 User account support

  • New support for formatting user fields and usernames
  • Uses hook_user_presave() to ensure compatibility with username generation modules
  • Fully configurable via new Users admin tab

🔹 Title formatting (NEW)

  • Apply formatting rules to node titles per content type
  • Configure via new Titles tab

🔹 Collapse Spaces (NEW)

  • Converts multiple spaces into a single space
    ("John Smith""John Smith")
  • Available for:
    • Field widgets
    • Titles
    • Usernames

🔹 Improved custom replacements

  • Now uses whole-word matching
  • Prevents issues like:
    • Luke becoming LUKe
  • Uses safe regex handling (preg_quote)

🔹 Cleaner admin interface

  • New tabbed layout:
    • Global
    • Titles
    • Users
    • Custom Replacements
  • Improved button styling using Backdrop-native patterns

🧠 Processing Pipeline

All formatting now follows a consistent pipeline:

  • Trim → Collapse Spaces → Case Transform → Custom Replacements

🔐 Safety Improvements

  • Formatting is explicitly opt-in
  • Username formatting is configurable (not automatic)
  • Prevents unintended data mutation or user lockouts
  • All custom replacements are regex-safe and escaped

⚠️ Upgrade Notes

  • Existing sites will automatically receive default config via update_1300()
  • Username formatting is disabled by default — enable only if required
  • Title formatting must be explicitly assigned per content type

💡 Recommended Usage

Context Recommended Settings
Names Trim + Collapse Spaces + Intercapped
Titles Trim + Collapse Spaces + CamelCase
Postcodes Uppercase
Free text Minimal formatting

🐞 Bug Fixes

  • Fixed formatting not applying outside node entities
  • Prevented duplicate processing of user entities
  • Fixed incorrect custom replacement behaviour
  • Resolved admin UI button inconsistencies

🙌 Credits

  • Steve Moorhouse (albanycomputers)
  • AI-assisted development (ChatGPT, Gemini)

If you encounter any issues or have feature requests, please use the issue queue:

👉 https://github.com/albanycomputers/acuity_text_formatter/issues

1.x-1.2.0

Choose a tag to compare

@albanycomputers albanycomputers released this 05 Dec 12:25

Added the ability to format a content type's Title.
Clarified project scope

1.x-1.1.0

Choose a tag to compare

@albanycomputers albanycomputers released this 04 Dec 12:41

Initial release