Jump to content

Sanitizer question


rooofl
 Share

Recommended Posts

I need to find the sinitizer used to generate page names from page titles. I found $sanitizer->pageName() but it seems to ignore special characters:

With $sanitizer-> pageName(), raphaël becomes raphal, however in the PW back-end the page title raphaël becomes raphael.

Any idea what I should use instead?

Link to comment
Share on other sites

Also, $sanitizer->pageName("raphaël", true) produces raphael.  The second param being $beautify, which according to the docs: 

"Because page names are often generated from a UTF-8 title, UTF-8 to ASCII conversion will take place when $beautify is enabled."

  • Like 2
Link to comment
Share on other sites

10 minutes ago, iank said:

The second param being $beautify, which according to the docs: 

True.

$sanitizer->pageNameTranslate() is just a proxy for Sanitizer::translate option for the $beautify argument 🙂 

  • Like 1
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...