Description
Describe the bug
When using the pagination feature, the URL for the prev parameter does not correctly append the query string separator. This results in malformed URLs when navigating through pages.
To Reproduce
Steps to reproduce the behavior:
- Go to a page with a pagination component.
- Ensure the current URL contains a query string (e.g., https://example.com/data?page=1).
- Click on the pagination button to go to the next page.
- Observe the resulting URL for the prev parameter.
Expected behavior
The expected behavior is that when navigating through pages, the URL should correctly append parameters. For example, if the current URL is https://example.com/data?page=1 and the user navigates to page 2, the resulting URL should be https://example.com/data?page=1&page=2.
Screenshots
N/A
Desktop:
- OS: Windows 11
- Browser: Chrome
- Version: 117.0.5938.92
Smartphone
N/A
Additional context
A possible solution is to modify the URL construction logic in the pagination code to check if the prev URL already contains a ?
. If it does, the code should use &
as the separator; otherwise, it should use ?
.