fixed Bug: Admin Dashboard “Open” button does not URL‑encode slashes in pad names (#7865).#7876
fixed Bug: Admin Dashboard “Open” button does not URL‑encode slashes in pad names (#7865).#7876abhijeetgorhe26 wants to merge 5 commits into
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
Review Summary by QodoFix URL encoding of pad names with special characters
WalkthroughsDescription• URL-encode pad names with slashes in admin dashboard "Open" button • Decode URL-encoded pad names when retrieving from pathname • Display decoded pad names in recent pads list and UI • Apply consistent formatting to admin PadPage component Diagramflowchart LR
A["Pad Name with Slash<br/>Test/123"] -->|encodeURIComponent| B["URL Encoded<br/>Test%2F123"]
B -->|Navigate| C["Browser URL<br/>...p/Test%2F123"]
C -->|decodeURIComponent| D["Display Name<br/>Test/123"]
D -->|Store| E["Recent Pads List<br/>Test/123"]
File Changes1. src/static/js/pad_userlist.ts
|
Code Review by Qodo
1.
|
9fe402a to
27ad42f
Compare
b00adcf to
d8ae7cd
Compare
|
@JohnMcLear Now see with least changes |
|
The core one-line fix in PadPage.tsx is correct and solves the issue. The recent-pads changes are reasonable a. Drop the var/.gitignore change. See point 7 - regression tests are important and your agents.md should have picked that up... Any reason it didn't? |
|
@JohnMcLear I make changes as you suggested to me. a. I dropped the var/.gitignore change. I did regression test and it gave me result:
|
|
You commited https://github.com/ether/etherpad/pull/7876/changes#diff-892db78ae810d5c65cc666e89dcb3127e11191a3225b134584fbc8d2fbaf9044 /var/log/update.log |
|
I think test coverage for the URL in the share dialog is missing. |
027dd63 to
78de447
Compare
|
@JohnMcLear According to your suggestions i done everything |
|
Test missing for the share dialog |
I solved that bug (#7865). Whenever someone types their name as Test/123 at padName, then only the URL will become ..p/Test%2F123, and the entry in recent Pads will remain the same as the typed name (i.e., Test/123).
### Changes verified
1) Working demo video
https://github.com/user-attachments/assets/b3c4f5f5-625f-40d6-84dd-7941daca499f
2) URL encoding working correctly

3) Pad name remains unchanged in Recent Pads list

fixes #7865