Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#46088 closed defect (bug) (duplicate)

URL slug is not correctly escaped in permalink preview during draft

Reported by: kirilsoshnin's profile kirilsoshnin Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.0
Component: Editor Keywords:
Focuses: Cc:



When creating a new post draft, the special characters in the slug are not escaped properly.

Steps to reproduce the bug:

1) Add new post

2) Write in the title: "the-test's-w/-$pecial-;chars" (without quotes)

3) Save draft

4) Open a new browser session and log back in to view the draft (optional step)

5) The permalink preview shows: http://wptest.local/the-test's-w--$pecial-;chars/

6) The forward slash is removed; but, the other special characters are not.

6.b) The expected result should be: http://wptest.local/the-tests-w-pecial-chars/

6.c) In fact, the expected result happens after the post is published.

The bug only seems to happen when the post is still in draft. However, prior to WP5, this bug did not exist.

Change History (3)

#1 @subrataemfluence
5 years ago

  • Keywords reporter-feedback added

Welcome to trac and thanks for the ticket!

Which editor you are using - Gutenberg or Classic Editor (plugin)?

From your component selection though, it looks like you are using Gutenberg. If so, can you please confirm whether the same issue persists with Classic Editor plugin as well when you set it as your default editor?

Last edited 5 years ago by subrataemfluence (previous) (diff)

#2 @kirilsoshnin
5 years ago


I was using the Gutenberg editor, without any plugin installed on the site. Also tested it on the Twenty Nineteen theme and Twenty Seventeen theme.

With the Classic Editor plugin installed and activated, the bug is not present. At step 6, the permalink preview with the Classic Editor correctly shows: the-tests-w-pecial-chars-2.

It seems this bug is isolated with the new block editor.

Last edited 5 years ago by kirilsoshnin (previous) (diff)

#3 @ocean90
5 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version changed from 5.0.3 to 5.0

Duplicate of #45478.

Note: See TracTickets for help on using tickets.