maximeschoeni / sublanguage

Multilanguage plugin for wordpress
42 stars 13 forks source link

Allow special characters in cpt archive url #51

Closed robert777robert777 closed 3 years ago

robert777robert777 commented 3 years ago

Don't do sanitize_slug on cpt archive url

sanitize_slug does urlencode and removes certain characters which are legal for cpt archive link

"мухи/список" is a valid url for cpt archive, but your code doesn't accept it

maybe sanitize_text_field() is better for this?

p.s. for the post type permalink base a change is also needed - but it does need some filtering (just without urlencode)

maximeschoeni commented 3 years ago

I reject your pull request because I changed in a other way but the change you request is active now (version 2.8).

Thanks for submitting!

robert777robert777 commented 3 years ago

Thanks! Now it works much better, but still some filtering may be needed - characters such as %?& can break the functionality (cause 404/400/redirect loop), but characters such as :/,= do work well