Skip to content

The & symbol becomes amp in the draft URL #62543

@marcarmengou

Description

@marcarmengou

Description

When you type Ampersand & And as the title of an Post and save the Post as a draft, you will see that the URL becomes /ampersand-amp-and/. If you publish the Post, the URL becomes /ampersand-and/.

I was originally going to write this issue asking if it was necessary to add amp to the URL, because from an SEO point of view it makes no sense and just unnecessarily lengthens the URL. However, during initial testing, when publishing the Post, the URL became /ampersand-and/.

Now, I wonder if this may cause confusion to other people. If this is a bug or if it makes any sense for amp to appear in the URL, even if only in drafts. Also, it is not the same with %, $, #, @, or others. For example, if you write Ampersand & And % One # Two $ Three @ Four the URL of the draft will be /ampersand-amp-and-one-two-three-four/

Step-by-step reproduction instructions

  1. Go to Settings > Permalinks and set Post name as a permalink structure.
  2. Create a Post and type Ampersand & And as the Post title.
  3. Save the Post as a Draft.
  4. In the editor sidebar click on the URL to view the generated URL. It is this: /ampersand-amp-and/
  5. Publish the Post.
  6. Chceck URL of the Post. It is this: /ampersand-and/

Screenshots, screen recording, code snippet

ampersand-and

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

Labels

[Package] Block editor/packages/block-editor[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions