Make WordPress Core

Opened 17 years ago

Closed 15 years ago

#10451 closed defect (bug) (duplicate)

Fancy single/double quotes not stripped from post stub

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

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)

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

  • Keywords needs-patch added
  • Milestone Unassigned3.0
  • Priority normalhigh

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.

+1

#2 @miqrogroove
16 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
16 years ago

  • Resolutionduplicate
  • Status newclosed

#4 @nacin
16 years ago

  • Milestone 3.0

#5 @dangaul
15 years ago

  • Resolution duplicate
  • Status closedreopened
  • Version 2.8.13.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
15 years ago

  • Keywords needs-patch removed
  • Resolutionduplicate
  • Status reopenedclosed
  • Version 3.2.12.8.1

Fixed in #10797.

Note: See TracTickets for help on using tickets.