Make WordPress Core

Opened 15 years ago

Closed 12 years ago

#10451 closed defect (bug) (duplicate)

Fancy single/double quotes not stripped from post stub

Reported by: viper007bond's profile Viper007Bond Owned by: ryan's profile ryan
Milestone: Priority: high
Severity: normal Version: 2.8.1
Component: Permalinks Keywords:
Focuses: Cc:


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)

#1 in reply to: ↑ description @miqrogroove
14 years ago

  • Keywords needs-patch added
  • Milestone changed from Unassigned to 3.0
  • Priority changed from normal to high

Replying to Viper007Bond:

A client of mine copy/pasted in a post title from MSWord or something.

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.


#2 @miqrogroove
14 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.

#3 @miqrogroove
14 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

#4 @nacin
14 years ago

  • Milestone 3.0 deleted

#5 @dangaul
12 years ago

  • 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

#6 @SergeyBiryukov
12 years 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.

Note: See TracTickets for help on using tickets.