Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

Vanilla 2.2.1 is now available.
Please upgrade to 2.2 here. The 2.0 and 2.1 branches are no longer being updated.

Non-URL-friendly characters conversion problem

In Vanilla 2 I've noticed all the non-URL-friendly characters are either replaced with dashes or discarded completely. As a consequence the URLs are totally meaningless if you happen to write in a language other than English. I don't think it's a feature, so I suppose it's a bug?

Vanilla 1 did a great job converting characters for "friendly URLs": for example an "ü" becomes "u", "ø" becomes "o" and so on.


  • LincLinc Vanilla's Bard Detroit Vanilla Staff
    File an issue on GitHub :) Not sure it'll make it for the first release, but it'd at least be good to note for later.
  • TiGRTiGR
    edited July 2010
    The fix is plain simple:

    $Mixed = utf8_decode(str_replace(self::$Code, self::$Translation, $Mixed));
    } else {
    in library/core/class.format.php, function Url.

    P.S: Have not tried pulling this, since I've got no response for my pulls.
  • @TiGR - thank you, it's working.
    And also related to this subject: in the same PHP file the $Code and $Translation arrays should be updated to include some of the other international characters. In my installation I added ș/Ș and ț/Ț which are used in Romanian language.
  • TimTim Operations Vanilla Staff
    @Todd has been working on a new version of Format::Url() that will handle these cases much better.

    Vanilla Forums Senior Developer [GitHub, Twitter,]

Sign In or Register to comment.