Make WordPress Core

Opened 16 years ago

Closed 14 years ago

#9492 closed defect (bug) (wontfix)

IRI Encoding of slugs is broken

Reported by: hakre's profile hakre Owned by: nbachiyski's profile nbachiyski
Milestone: Priority: normal
Severity: normal Version: 2.7.1
Component: I18N Keywords: needs-patch
Focuses: Cc:

Description

According to ryan, WordPress does "standard IRI-to-URI conversion for slugs." http://core.trac.wordpress.org/ticket/9480#comment:2

If that is true (what I assume), this feature is broken. Just tested the Post Title "Äpfel wachsen überirdisch" and it is converted to "apfel-wachsen-uberirdisch".

That is not the correct IRI encoding. Properly IRI encoded, the string must be converted to: "%c3%84pfel%20wachsen%20%c3%bcberirdisch".

Change History (9)

#1 @ryan
16 years ago

We decompose accented Latin characters to their unaccented forms. See remove_accents().

#2 @hakre
16 years ago

Well, that's irritating. So infact the the slug is partly IRI encoded? Is next to remove_accents() other stuff made? Why is that done anyway, the IRI stuff looks very good.

#3 @hakre
16 years ago

Well obviously spaces are replaced with minus-signs as well.

#4 @ryan
16 years ago

  • Milestone 2.7.2 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

It's done because people like it. Regardless, changing how slugs are encoded breaks resolution of old slugs. The current method won't change until we have a means of resolving slugs made with different versions of the sanitizer.

#5 @hakre
16 years ago

sanitizer = sanitize_title();

#6 @hakre
15 years ago

Related: #12361.

#7 @texttheater
14 years ago

One can live with this as long as it's possible to fix it via the plugin API. Which it isn't anymore in 3.1, see #16905.

#8 @texttheater
14 years ago

  • Cc poststelle@… added
  • Resolution wontfix deleted
  • Status changed from closed to reopened

#9 @texttheater
14 years ago

  • Resolution set to wontfix
  • Status changed from reopened to closed

Sorry, I just wanted to add myself to Cc.

Note: See TracTickets for help on using tickets.