Friendly url - remove spaces in url

currently when new page is created the url of the page has the same name, for example “New page” has URL “/xwiki/bin/view/New%20Page/”

I am trying to implement functionality which removes spaces in URL, thus becoming ("/xwiki/bin/view/NewPage/") making it more user friendly. I know that Page URL and Page Name are two different attributtes, but i cant find their names.

Can you please point me in the right direction in terms of java files responsible for those processes (create page/rename page)?

Thank you!

Hi,

we introduced in XWiki 12.0 some strategies to be able to automatically rename the page and check their title, notably to avoid having some characters in page URLs. One of the proposed strategy is to obtain “slug” names, like the one you have on this forum with dashes instead of spaces and special characters.
You can see the documentation there: Page Naming Strategies API (XWiki.org).