-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Navigation issues with percent sign in names #82440
Comments
Pinging @elastic/es-ui (Team:Elasticsearch UI) |
We've also encountered this on the User management screen: #83541 |
Just ran into this exactly as well with the Enterprise Search plugin. FYI that this |
Just heard back from @yakhinvadim on this - it turns out that the reason is indeed because we pinned
Not sure how debilitating this issue is for y'all, but it might be worth considering pinning |
#132600 is tracking the work to upgrade the |
FYI, there's a workaround that we could investigate if the effort involved to upgrade remains blocking. |
Pinging @elastic/kibana-management (Team:Kibana Management) |
Kibana version:
Current master branch
Describe the bug:
Navigation doesn't work correctly for resources with names containing percent sign with other special characters or containing
%25
sequence. The issue occurs in plugins:The issue occurs because
history
package (react-router
dependency) usesdecodeURI
on the url and only happens when the user reloads a page or navigates from outside of Kibana via a deep link. The issue doesn't happen when navigating inside Kibana withreact-router
whenencodeURI
is used on the url.Explanation of match params decoding in react-router
decodeURI
is called internally inreact-router/history
packagetest%25%23
test%25%23
encodeURIComponent('test%25%23')
is used in components getting match params from react-router to get the correct policyNametest%#
.When the user reloads the page, react-router decodes the value coming from the address bar:
decodeURI('test%25%23')
results in match params set totest%%23
encodeURIComponent('test%%23')
throws anURIError
, so using match params directly results in the wrong policy nametest%%23
.The issue might be fixed once
react-router
is updated to v6 (which useshistory
v5).Related history packages issues: 505, 777, 786
Steps to reproduce:
test%25
ortest%#
and click 'save' button.test%
(nottest%25
) ortest%%23
(nottest%#
).test%25
ortest%#
test%
(nottest%25
) ortest%%23
(nottest%#
).Screenshot
The text was updated successfully, but these errors were encountered: