Opened 4 years ago
Closed 19 months ago
#10451 closed defect (bug) (duplicate)
Fancy single/double quotes not stripped from post stub
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | Permalinks | Version: | 2.8.1 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
A client of mine copy/pasted in a post title from MSWord or something. It contained a fancy single quote. For example:
Here’s An Example
That was not removed when creating the post stub which caused issues:
They scheduled that post for the future, and then attempted to preview it. It wouldn't work -- $post appeared to be empty (I didn't check, but all content was missing). Removing the fancy single quote from the post stub fixed the issue.
They are using index.php based pretty permalinks which may matter as I am unable to reproduce it on my mod_rewrite based install.
Change History (6)
comment:1
in reply to:
↑ description
miqrogroove — 3 years ago
- Keywords needs-patch added
- Milestone changed from Unassigned to 3.0
- Priority changed from normal to high
comment:2
miqrogroove — 3 years ago
p.s. I've seen it happen with em-dash too. That char is commonly injected with copypasta from the category administration screen.
comment:3
miqrogroove — 3 years ago
- Resolution set to duplicate
- Status changed from new to closed
- Resolution duplicate deleted
- Status changed from closed to reopened
- Version changed from 2.8.1 to 3.2.1
This is not fixed in referenced bug #9591. #9591 refers to when people type the title, then yes wordpress removes these special characters.
However, please read this bug, it still happens.
If the user pastes from Microsoft Word or another application a string that has these special characters into the Title field, then the characters are not stripped from the permalink.
This is extremely easy to reproduce.
Try with this string:
chevrolet volt’s lithium
comment:6
SergeyBiryukov — 19 months ago
- Keywords needs-patch removed
- Resolution set to duplicate
- Status changed from reopened to closed
- Version changed from 3.2.1 to 2.8.1
Fixed in #10797.

Replying to Viper007Bond:
There's actually a WordPress function that forcibly inserts those characters into titles and slugs. It annoys the hell out of me too, because they get converted into a 3-byte UTF-8 representation in the URL :( I'm betting there are duplicates of this bug report, but I'll set optimistic metas.
+1