Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-69675

QUrl fails to say URLs with unassigned codepoints are invalid

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.11.2
    • 5.11.1
    • Core: URL Handling
    • None
    • b0479aab297f041aa9842c3e1996d62c16d7dbcf

    Description

      Some parts of the host part of urls seems to be stripped if it involves some unicode characters, like emojis. For example the URL which emojipedia should be reachable by (it is listed near the bottom of the page) see the attached emojipedia-url.jpg if you are having trouble finding that lonely text on a busy page, JIRA won't let me submit anything with the requisite emojis.

      See noemoji-various-constructors.log for a demonstration of using `QUrl()`, `QUrl::fromUserInput()` and `QUrl.setHost()`.

      At least one of the URLs in the noemoji-various-constructors.log file (again, I couldn't put it inline) is a real URL that users might input to a Qt based application. That application would then have a QUrl that reported as valid but didn't represent the URL that the user had entered and would likely cause errors when attempting to be used later.

      I haven't tested this on dev or platforms other than linux, just on 5.11.1 (arch x86_64) and 5.10.1 (debian unstable i386) but I don't think it is version dependant.

      Attachments

        1. emojipedia-url.jpg
          emojipedia-url.jpg
          6 kB
        2. emoji-url.cpp
          0.3 kB
        3. noemoji-various-constructors.log
          0.7 kB

        Activity

          People

            thiago Thiago Macieira
            toofar toofar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: