Howdy, Stranger!

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

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

BUG: Pages url have problems with special characters, accents, umlauts and symbols in page title

The automatical generated url for pages has problems with special characters, accents, umlauts and symbols in page title.

For Example:

Page Name:                   Sample Imprint ÄÖÜäöü߀
Page URL:                     pages/sample-imprint-�������
Page URL Source Code: <a href=".../pages/sample-imprint-%E3%84%E3%96%E3%9C%E3%A4%E3%B6%E3%BC%E3%9F">

Best regards,
Jürgen

Comments

  • I'm not surprised, since pages haven't been updated yet to work with the Multi Language feature, which btw still isn't done.
  • edited November 2015
    But this doesn't depend on the multilanguage feature, it depends on how the url will be generated. In the name special characters, accents und umlauts are displayed correctly.
  • @ntozier: Give it a try, replace the function in include > class.format.php

        function slugify($text)
        {
              // replace non letter or digits by -
              $text = preg_replace('~[^\\pL\d]+~u', '-', $text);
            // trim
              $text = trim($text, '-');
            // transliterate
              if (function_exists('iconv'))
                  {
                $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);
                  }
            // lowercase
              $text = strtolower($text);
            // remove unwanted characters
              $text = preg_replace('~[^-\w]+~', '', $text);
              if (empty($text))
               {
                return 'n-a';
               }
              return $text;
        }

    The result is:

    Page Name:                   Sample Imprint ÄÖÜäöü߀
    Page URL:                     pages/sample-imprint-aeoeueaeoeuess
    Page URL Source Code: <a href=".../pages/sample-imprint-aeoeueaeoeuess">

    Best regards,
    Jürgen
Sign In or Register to comment.