Howdy, Stranger!

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

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter
Support for Vanilla Forums Cloud product

In this Discussion

Follow Us

Non-URL-friendly characters conversion problem

edited July 2010 in Questions
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.


  • LincolnLincoln Community Instigator 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.

    Sr Developer at Vanilla Forums [GitHub, Twitter]

  • TiGRTiGR New
    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 Lord of Servers 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.