Make WordPress Core

Opened 6 years ago

Closed 6 years 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's profile garrett-eclipse Owned by: desrosj's profile desrosj
Milestone: 5.2 Priority: normal
Severity: normal Version: 5.2
Component: Text Changes Keywords: has-patch commit
Focuses: Cc:

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 6 years ago.
Prefix new htaccess references with the dot to make them .htaccess 'hidden files'
46841.patch (1013 bytes) - added by subrataemfluence 6 years ago.
Two more places missing (.) in .htaccess.
#46841.patch (512 bytes) - added by burhandodhy 6 years ago.
missing (.) for (.htaccess)
46841.3.diff (908 bytes) - added by ianbelanger 6 years ago.
Refresh of original patch by @garrett-eclipse

Download all attachments as: .zip

Change History (13)

@garrett-eclipse
6 years ago

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

#1 @ocean90
6 years 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
6 years 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
6 years ago

Two more places missing (.) in .htaccess.

@burhandodhy
6 years ago

missing (.) for (.htaccess)

#3 @subrataemfluence
6 years ago

@burhandodhy I added it already in my patch :)

#4 follow-up: @swissspidy
6 years 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
6 years 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
6 years ago

Refresh of original patch by @garrett-eclipse

#6 @ianbelanger
6 years 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
6 years ago

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

#8 @desrosj
6 years ago

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

#9 @desrosj
6 years 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.