Martin Muzatko Posted September 21, 2017 Share Posted September 21, 2017 See 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. Link to comment Share on other sites More sharing options...
Robin S Posted September 21, 2017 Share Posted September 21, 2017 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. 2 Link to comment Share on other sites More sharing options...
szabesz Posted September 22, 2017 Share Posted September 22, 2017 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now