[bug] utf-8 characters in author permanent urls (2 posts)

  1. gr3ma
    Posted 5 years ago #

    Hello, I had a problem with my blog. I use russian characters in author names, so urls to authors page contain this characters.
    Example of URL: http://stateika.co.cc/author/%D0%98%D0%B3%D0%BE%D1%80%D1%8C%20%D0%9D%D0%B0%D0%B7%D0%B0%D1%80%D0%BE%D0%B2/
    To such link WP output me 404 page, not this current blog - I already resolve problem. About what I want report to all WP community - may be somebody have the same problems.
    I begin to reverse engineering the problem and found, that in file: wp-includes/query.php on line 1977(for 2.9.2 version):
    > $q['author_name'] = sanitize_title($q['author_name']);
    Function 'sanitize_title' changing my utf-8 characters to symbols with % hex codes and such author_name try to find in database in nice names. Obviously it can't find there anything and outputs me 404 page. I resolved this problem by changing function 'sanitize_title' to 'sanitize_user', the line after my changes looks like:
    > $q['author_name'] = sanitize_user($q['author_name']);

    I think that this is a bug, because WP isn't work normally in that case. Don't know if I have resolved it securely, so please help me to check and finish with this bug. And than I think we need to update sources of WP.

    p.s I tested this problem on WP 3.0 - there it is present too.

  2. jimjimjim
    Posted 4 years ago #

    Did you find any resolve to this?

Topic Closed

This topic has been closed to new replies.

About this Topic