Make WordPress Core

Opened 15 years ago

Closed 14 years ago

#12373 closed defect (bug) (duplicate)

Problems with slugs - urldecode

Reported by: bi0xid's profile bi0xid Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Optimization Keywords: urldecode slug permalink optimization validation has-patch
Focuses: Cc:

Description

Hi there.

Spanish users have some problems with permalink/slug creation.
Here we use '¿' and '¡' as common characters. This characters are not included in urldecode function, so they appear as-is.

If I write as title:

¿Animación compartida en España?

the slug/permalink will be:

¿animacion-compartida-en-espana

Sadly, this character brokes FeedBurner catcher and our customers are not very happy.

We have tried to do a personalized function and used it in the filter:

add_filter( 'editable_slug', 'slughish_url');

but it doesn't work (it returns a changed ñ->n, which is not specified in the function, and returns c2bf for ¿).

Any ideas?

Attachments (1)

formatting_patch.diff (512 bytes) - added by nstielau 14 years ago.

Download all attachments as: .zip

Change History (6)

#1 @bi0xid
15 years ago

Duplicates #3206, merged with #9591 but not very clear.

#2 @nstielau
14 years ago

Isolated inverted question mark and inverted exclaimation point to chr(194).chr(191) and chr(194).chr(161), respectively. Now looking at where this should go, remove_accents() or sanitize_title_with_dashes().

#3 @nstielau
14 years ago

Not sure whether this should go in sanitize_title_with_dashes() or remove_accents(). On one hand, this is accent-like, so it could be removed in remove_accents(). On the other hand, this is really punctuation which should be stripped out, which happens in sanitize_title_with_dashes(), because remove_accents() is really just translating accented characters to non-accented characters.

remove_accents() does remove the British Pound sign, so with that precedent, I'm removing these chars in remove_accents().

#4 @nstielau
14 years ago

  • Keywords has-patch added

#5 @scribu
14 years ago

  • Milestone 3.0 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Marking this as a dup of #9591. See the discussion there on why it's not such a simple fix.

Note: See TracTickets for help on using tickets.