When viewing redirects in the "Redirect URL" view (/admin/config/search/redirect) The urls in the From and To columns are not decoded. This leads to very hard to read urls when they contain non latin characters.

How to replicate
1. Add a redirect rule containing non latin characters, for example set path to: /会社概要/イベントン and
2. Check the added redirect on /admin/config/search/redirect

Expected behaviour
The text in the from column should read /会社概要/イベントン

Actual behaviour
The text in the from coulmn reads /%E4%BC%9A%E7%A4%BE%E6%A6%82%E8%A6%81/%E3%82%A4%E3%83%99%E3%83%B3%E3%83%88%E3%83%B3

Proposed fix
Adding urldecode() to the RedirectSourceFormatter should fix the output in the From column.
Fixing the To column cannot be done in this module since the column uses the LinkFormatter defined in core.

Comments

reekris created an issue. See original summary.

reekris’s picture

Status: Active » Needs review
StatusFileSize
new580 bytes

Here is patch that adds urldecode() as proposed.

berdir’s picture

Makes sense, any change you can write a test for this?

rahul.nahar001’s picture

Status: Needs review » Needs work
StatusFileSize
new36.74 KB

Hi @reekris,

I have checked above mentioned steps this patch not working for me.

Expected behavior does not come after applied the provided patch.

PFA.

Thanks
Rahul

dinesh18’s picture

StatusFileSize
new71.86 KB

Hello,

We need to execute the code again by saving the same URL re-direct. PFA screenshot and it is working as expected.

Thanks,
Dinesh.K

dinesh18’s picture

Status: Needs work » Needs review

Status changed to Needs Review.
@Rahul Could you please test at your end as well.

rahul.nahar001’s picture

StatusFileSize
new29.92 KB

Hi @Dinesh18,

The "To" URL is not showing as expected. PFA.

Thanks
Rahul Nahar

rahul.nahar001’s picture

Status: Needs review » Needs work

Status changed to Need Work.

dinesh18’s picture

As per the proposed resolution, To column cannot be done in this module.

rahul.nahar001’s picture

Status: Needs work » Reviewed & tested by the community

Sorry, I missed it.
So for "FROM" column, it is working as expected.

berdir’s picture

We should probably open a core issue so this can be done in the core formatter as well.

berdir’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.