WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 3 years ago

#9492 closed defect (bug) (wontfix)

IRI Encoding of slugs is broken

Reported by: hakre Owned by: 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)

comment:1 ryan5 years ago

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

comment:2 hakre5 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.

comment:3 hakre5 years ago

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

comment:4 ryan5 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.

comment:5 hakre5 years ago

sanitizer = sanitize_title();

comment:6 hakre4 years ago

Related: #12361.

comment:7 texttheater3 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.

comment:8 texttheater3 years ago

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

comment:9 texttheater3 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.