Make WordPress Core

Opened 14 months ago

Last modified 12 months ago

#58492 new defect (bug)

Plugin Search Issue: Trimming of Keywords with Ampersand (&) upon Page Refresh

Reported by: adhun's profile adhun Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.3
Component: Plugins Keywords: has-patch
Focuses: ui Cc:

Description

I have encountered a peculiar issue with the plugin search functionality in the WordPress backend. When performing a plugin search using keywords that contain an ampersand (&) character and refreshing the page twice, the keywords are getting trimmed, resulting in incomplete search results.

Steps to Reproduce:

  1. Access the WordPress backend.
  2. Navigate to the Plugins section.
  3. In the search box, enter keywords that include an ampersand character, e.g., "search & replace"
  4. Press Enter or click the Search button.
  5. Note the search results.
  6. Refresh the page twice by pressing F5 or using the browser's refresh button.
  7. Observe that the search keywords are being trimmed to "search" only.
  8. The search results are now incomplete, as the full keywords were not used for the search.

Expected Results:
The plugin search should retain the complete keywords, including the ampersand character, upon page refreshes. This would ensure accurate and consistent search results, even after multiple page refreshes.

Actual Results:
Upon refreshing the plugin search page twice, the keywords containing an ampersand (&) are trimmed, resulting in incomplete search results.

Reproducibility:
Consistently reproducible.

Attachments (3)

58492.diff (1018 bytes) - added by adhun 14 months ago.
On further inspection i found that on wp_admin_canonical_url function url is not properly encoded before passing to javascriptt.
58492.2.diff (1018 bytes) - added by adhun 14 months ago.
On further inspection i found that on wp_admin_canonical_url function url is not properly encoded before passing to javascript.
58492.3.diff (1018 bytes) - added by adhun 14 months ago.
On further inspection i found that on wp_admin_canonical_url function url is not properly encoded before passing to javascript. Patched by adding urlencode function.

Download all attachments as: .zip

Change History (6)

@adhun
14 months ago

On further inspection i found that on wp_admin_canonical_url function url is not properly encoded before passing to javascriptt.

@adhun
14 months ago

On further inspection i found that on wp_admin_canonical_url function url is not properly encoded before passing to javascript.

@adhun
14 months ago

On further inspection i found that on wp_admin_canonical_url function url is not properly encoded before passing to javascript. Patched by adding urlencode function.

#1 @adhun
14 months ago

All of the above patch files are same, i accidentally uploaded it thrice.

This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.


12 months ago

#3 @joedolson
12 months ago

  • Focuses accessibility removed
Note: See TracTickets for help on using tickets.