Make WordPress Core

#58678 closed defect (bug) (fixed)

Site Health: Escaped HTML in test label

Reported by: dlh's profile dlh Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.3 Priority: normal
Severity: normal Version: 6.3
Component: Site Health Keywords: has-patch has-screenshots
Focuses: Cc:

Description

The Site Health test for writeable backup directories added in [55720] includes a check for the wp-content directory path. When this test fails, the label for the result displays (<code>wp-content</code>), as these labels are HTML-escaped.

The linked PR would remove the HTML from the label. wp-content still appears in the result description, and keeping the directory name out of the label is still consistent with at least some of the other labels in the test, such as The temporary backup directory exists but is not writable.

Attachments (2)

Screenshot 2023-06-30 at 1.36.08 AM.png (56.9 KB) - added by dlh 13 months ago.
Screenshot 2023-06-30 at 12.10.00 PM.png (22.9 KB) - added by mukesh27 13 months ago.
After patch

Download all attachments as: .zip

Change History (13)

This ticket was mentioned in PR #4763 on WordPress/wordpress-develop by dlh01.


13 months ago
#1

  • Keywords has-patch added

#2 @mukesh27
13 months ago

  • Keywords commit has-screenshots added

Thanks @dlh for the ticket and PR. Look good to me and approved.

Added commit for consideration.

#3 @johnbillion
13 months ago

  • Milestone changed from Awaiting Review to 6.3

#4 follow-up: @audrasjb
13 months ago

By default, $wp_content returns a path, like for instance /home/htdocs/wordpress/wp-content/. Not sure we should display the whole path in the description?

Last edited 13 months ago by audrasjb (previous) (diff)

#5 @audrasjb
13 months ago

  • Keywords commit removed

#6 @SergeyBiryukov
13 months ago

In 56117:

Site Health: Correct the label for wp-content directory check.

This removes HTML tags from the label, which were not displayed as expected due to escaping. Including the directory name in the label is also redundant, as it is already mentioned in the check result description directly below.

Includes:

  • Adjusting a few other labels for consistency.
  • Moving wp-content out of the translatable string in a similar message in WP_Upgrader::generic_strings().

Follow-up to [55720].

Props dlh, mukesh27, audrasjb, SergeyBiryukov.
See #58678.

@SergeyBiryukov commented on PR #4763:


13 months ago
#7

Thanks for the PR! Merged in r56117.

#8 in reply to: ↑ 4 ; follow-up: @SergeyBiryukov
13 months ago

Replying to audrasjb:

By default, $wp_content returns a path, like for instance /home/htdocs/wordpress/wp-content/. Not sure we should display the whole path in the description?

I might be missing something, but I don't see the full path displayed anywhere in the description, could you clarify? :)

#9 @SergeyBiryukov
13 months ago

  • Owner set to SergeyBiryukov
  • Status changed from new to accepted

#10 in reply to: ↑ 8 @audrasjb
13 months ago

Replying to SergeyBiryukov:

I might be missing something, but I don't see the full path displayed anywhere in the description, could you clarify? :)

My bad, I misunderstood the PR 🙃

#11 @SergeyBiryukov
13 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

Ah, no worries :)

Note: See TracTickets for help on using tickets.