SEF URLS containing non-URL characters

Bug #235072 reported by flobster
2
Affects Status Importance Assigned to Milestone
phpns
Fix Committed
Undecided
Unassigned

Bug Description

SEF URLs are inaccessible when article titles contain non-URL characters like !, ?, or special characters like é, ä, ü, ö.

Revision history for this message
alecwh (alecwh) wrote :

Fixed in the last bzr commit (fixed in 2.2.2). Affected shownews.php.

Changed in phpns:
status: New → Fix Committed
Revision history for this message
flobster (4tpeaks) wrote :

There is still a problem with special charaters in article_title and SEF-URLs. Special characters like german "umlaute" (ä, ö, ü, ?) don't work with SEF-URLs. For example the german word "spät" becomes "spät" in the database, resulting SEF-URL is inaccessible (display on a web page is fine, though!). When manually urlencoding the same word (spät), it's written "spät" in the DB and "spampaumlt" in article_sef_title, everything works fine, although the resulting URL looks quite strange. So maybe urlencoding article-title could help fixing that.

Revision history for this message
flobster (4tpeaks) wrote :

I already found a solution: all these special characters need to be added to the function "create_sef" in function.php (around line 800). For example adding:

$input = str_replace('ä', 'ae', $input);

will solve the problem described above, resulting SEF-URL will also be readable for the user. So, urlencoding will not be necessary.

Revision history for this message
flobster (4tpeaks) wrote :

Update: the above fix only seems to work in the latest bzr revision 38. In 2.2.3 release version, article_sef_title won't change on update.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.