WordPress.org

Make WordPress Core

Opened 14 hours ago

Last modified 3 hours ago

#49868 new defect (bug)

Replace backticks in .htaccess instructions with regular quotes

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

Download all attachments as: .zip

Change History (5)

#1 in reply to: ↑ description ; follow-up: @mayankmajeji
12 hours 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
11 hours 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
3 hours ago

Backticks replaced by regular quotes

#3 @mayankmajeji
3 hours ago

  • Keywords has-patch added; needs-patch removed

#4 in reply to: ↑ 2 @mayankmajeji
3 hours 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

Note: See TracTickets for help on using tickets.