WordPress.org

Make WordPress Core

#49868 closed defect (bug) (fixed)

Replace backticks in .htaccess instructions with regular quotes

Reported by: SergeyBiryukov Owned by: 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 13 months ago.
Backticks replaced by regular quotes

Download all attachments as: .zip

Change History (6)

#1 in reply to: ↑ description ; follow-up: @mayankmajeji
13 months 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
13 months 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
13 months ago

Backticks replaced by regular quotes

#3 @mayankmajeji
13 months ago

  • Keywords has-patch added; needs-patch removed

#4 in reply to: ↑ 2 @mayankmajeji
13 months 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
13 months 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.