Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-13575

make_clickable multi-byte substring error

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Duplicate
    • 3.0.12
    • 3.1.4-RC1
    • Posting
    • None

    Description

      If you try to post url with non-latin symbols (example:
      https://ru.wikipedia.org/wiki/Миллиган,_Билли ) you get an error.
      Solution:

      file: /includes/functions_content.php
      function: make_clickable_callback
      string:
      $short_url = (strlen($url) > 55) ? substr($url, 0, 39) . ' ... ' . substr($url, -10) : $url;

      replace with multi-byte versions:
      $short_url = (mb_strlen($url) > 55) ? mb_substr($url, 0, 39) . ' ... ' . mb_substr($url, -10) : $url;

      Attachments

        Issue Links

          Activity

            People

              bantu Andreas Fischer
              olkpeas olkpeas [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: