SIGN IN SIGN UP
payloadcms / payload UNCLAIMED

Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.

0 0 16 TypeScript

feat: improve default slugify utility by triming whitespace first (#14421)

Currently, when you are creating slugs and leave spaces on beggining or
the end, they will be replaced with hyphen, this enhancement avoids
trims unwanted spaces first.

### What?
Utilities for creating slugs from titles

### Why?
Badly created slug with hyphen in the end, when user added title with
space.

### How?
Adding simple `trim()` function before replacing spaces with hyphens

Co-authored-by: Paul Popus <paul@payloadcms.com>
M
MichalKormanik committed
fdaa051d036994cc267e1b50e643134d9dd85763
Parent: c3ec73f
Committed by GitHub <noreply@github.com> on 4/2/2026, 5:43:49 PM