WordPress.org

Make WordPress Core

Opened 8 months ago

Closed 8 months ago

#46841 closed defect (bug) (fixed)

References to htaccess should be preceded with the dot to denote it's a hidden file - .htaccess

Reported by: garrett-eclipse Owned by: desrosj
Milestone: 5.2 Priority: normal
Severity: normal Version: 5.2
Component: Text Changes Keywords: has-patch commit
Focuses: Cc:
PR Number:

Description

Hello,

The references to htaccess introduced in the class-wp-debug-data.php should be prefixed with the dot to indicate that it's a hidden file, reference;
https://github.com/WordPress/WordPress/blob/master/wp-admin/includes/class-wp-debug-data.php#L603-L606

Referring to the Glossary;
".htaccess is a hidden file in Unix/Linux (as dictated by the preceding period '.'),"
Reference - https://codex.wordpress.org/Glossary#.htaccess

As well in all core references, it's noted as .htaccess. Just noticed while translating.

Cheers

Attachments (4)

46841.diff (945 bytes) - added by garrett-eclipse 8 months ago.
Prefix new htaccess references with the dot to make them .htaccess 'hidden files'
46841.patch (1013 bytes) - added by subrataemfluence 8 months ago.
Two more places missing (.) in .htaccess.
#46841.patch (512 bytes) - added by burhandodhy 8 months ago.
missing (.) for (.htaccess)
46841.3.diff (908 bytes) - added by ianbelanger 8 months ago.
Refresh of original patch by @garrett-eclipse

Download all attachments as: .zip

Change History (13)

@garrett-eclipse
8 months ago

Prefix new htaccess references with the dot to make them .htaccess 'hidden files'

#1 @ocean90
8 months ago

  • Component changed from I18N to Text Changes
  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 5.2

There are a few places in core where we use a placeholder instead to replace it with '<code>.htaccess</code>'. Can we do this here too?

#2 @swissspidy
8 months ago

The labels and values are escaped with esc_html() in src/wp-admin/site-health-info.php.

Other places in that table there use wp_kses(), which potentially could be a bit slow when applied to all the debug data.

@subrataemfluence
8 months ago

Two more places missing (.) in .htaccess.

@burhandodhy
8 months ago

missing (.) for (.htaccess)

#3 @subrataemfluence
8 months ago

@burhandodhy I added it already in my patch :)

#4 follow-up: @swissspidy
8 months ago

Let's focus on the Site Health part first before doing a search and replace on unrelated docs :-)

#5 in reply to: ↑ 4 @subrataemfluence
8 months ago

Sure. Sorry for jumping in! I thought otherwise, i.e. this change might required to be implemented wherever it is present!

Replying to swissspidy:

Let's focus on the Site Health part first before doing a search and replace on unrelated docs :-)

@ianbelanger
8 months ago

Refresh of original patch by @garrett-eclipse

#6 @ianbelanger
8 months ago

  • Keywords commit added

The original patch no longer applied cleanly, so 46841.3.diff is a refresh of that, which only focuses on Site Health pages

#7 @garrett-eclipse
8 months ago

Thanks @ianbelanger this looks good, hoping it can make it in today before string freeze.

#8 @desrosj
8 months ago

  • Owner set to desrosj
  • Status changed from new to reviewing

#9 @desrosj
8 months ago

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

In 45171:

Site Health: Correctly refer to an .htaccess file as hidden.

The preceding period (.) should always be included when referring to an .htaccess file.

Props: ianbelanger, garrett-eclipse, subrataemfluence, burhandodhy.
Fixes #46841.

Note: See TracTickets for help on using tickets.