Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with foreign languages #61

Open
eliyadzz opened this issue Feb 24, 2022 · 4 comments
Open

Issue with foreign languages #61

eliyadzz opened this issue Feb 24, 2022 · 4 comments

Comments

@eliyadzz
Copy link

eliyadzz commented Feb 24, 2022

If you set a custom permalink in a foreign language there are infinite redirects

please apply this code:

if ( isset( $_SERVER['REQUEST_URI'] ) ) {
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
$this->request_uri = urldecode($_SERVER['REQUEST_URI']);
}

In class-custom-permalinks-frontend.php

@samiahmedsiddiqui
Copy link
Owner

@eliyadzz Can you please share a use case to test this code?

@eliyadzz
Copy link
Author

Just set this slug for a post คาสิโนออนไลน์ที่ดีที่สุด and check it

binyaminadzz added a commit to Adzz-Rnd/custom-permalinks that referenced this issue Feb 28, 2022
This addresses issues raised by @eliyadzz samiahmedsiddiqui#61

Co-Authored-By: eliyadzz <87637445+eliyadzz@users.noreply.github.com>
@eliyadzz
Copy link
Author

eliyadzz commented Mar 1, 2022

Hi, please deal with this,
I've applied this change manually in production because it breaks my sites
line 261 as well,
class-custom-permalinks-frontend.php
you should decode the request because it can be encoded and you won't get a match with the Database

@samiahmedsiddiqui
Copy link
Owner

samiahmedsiddiqui commented Jan 18, 2023

@eliyadzz I have used "คาสิโนออนไลน์ที่ดีที่สุด" in slug and visit "/คาสิโนออนไลน์ที่ดีที่สุด". It works fine for me. I have tested this slug with Custom Permalinks v2.5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants