Jump to content

Recommended Posts

Posted

See gif:

name.gif.25f602ee30050d674d1b07caea5ae441.gif

When I use $sanitizer->pageName()  to sanitize a title as name, I get a different result from what processwire automatically replaces, when editing the name in the CMS.

I have to manually replace the dashes and even dots!

I would expect the name to be equal to the last segment of the pagepath.

  

Posted

There's nothing invalid about the original page name in your gif. Adding the $beautify argument to $sanitizer->pageName() will give a result that is closer to the JS replacement that happens in the admin interface.

But I take your point that it would be useful to have a sanitizer option that is an exact match for the JS replacement.

  • Like 2
Posted
On 9/21/2017 at 12:48 PM, Robin S said:

JS replacement

Maybe implementing it with an ajax API call instead of a JS replacement would do the trick.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...