Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#49868 closed defect (bug) (fixed)

Replace backticks in .htaccess instructions with regular quotes

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.5 Priority: normal
Severity: trivial Version:
Component: Rewrite Rules Keywords: good-first-bug has-patch
Focuses: Cc:

Description

Background: #47466

[45694] added a comment to # BEGIN/END .htaccess markers:

# The directives (lines) between `BEGIN %1$s` and `END %1$s` are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.

The problem with the backtick characters here is that they're not necessary and result in additional markup when pasted on support forums, see this topic for example:

# The directives (lines) between <code>BEGIN WordPress</code> and <code>END WordPress</code>...

They should be replaced with regular quotes:

# The directives (lines) between "BEGIN %1$s" and "END %1$s"...

Attachments (1)

49868.diff (592 bytes) - added by mayankmajeji 4 years ago.
Backticks replaced by regular quotes

Download all attachments as: .zip

Change History (6)

#1 in reply to: ↑ description ; follow-up: @mayankmajeji
4 years ago

Hi @SergeyBiryukov,

It seems HTACCESS File is not a part of the WordPress trunk. I can make the required changes if you can tell where can I find htaccess file.

Thanks in advance.

Replying to SergeyBiryukov:

Background: #47466

[45694] added a comment to # BEGIN/END .htaccess markers:

# The directives (lines) between `BEGIN %1$s` and `END %1$s` are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.

The problem with the backtick characters here is that they're not necessary and result in additional markup when pasted on support forums, see this topic for example:

# The directives (lines) between <code>BEGIN WordPress</code> and <code>END WordPress</code>...

They should be replaced with regular quotes:

# The directives (lines) between "BEGIN %1$s" and "END %1$s"...

#2 in reply to: ↑ 1 ; follow-up: @knutsp
4 years ago

Replying to mayankmajeji:

It seems HTACCESS File is not a part of the WordPress trunk. I can make the required changes if you can tell where can I find htaccess file.

Hint: [45694] changes wp-admin/includes/misc.php

@mayankmajeji
4 years ago

Backticks replaced by regular quotes

#3 @mayankmajeji
4 years ago

  • Keywords has-patch added; needs-patch removed

#4 in reply to: ↑ 2 @mayankmajeji
4 years ago

Thanks a lot, mate.

I've updated the file and created a patch.

Replying to knutsp:

Replying to mayankmajeji:

It seems HTACCESS File is not a part of the WordPress trunk. I can make the required changes if you can tell where can I find htaccess file.

Hint: [45694] changes wp-admin/includes/misc.php

#5 @SergeyBiryukov
4 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 47571:

Rewrite Rules: Use double quotes instead of backticks in .htaccess instructions about # BEGIN/END markers.

Previously, the backticks resulted in extra markup being added when posted on support forums.

Props mayankmajeji, knutsp.
Fixes #49868.

Note: See TracTickets for help on using tickets.