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

Qt's CSS parser doesn't eat unquoted URL strings with query

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.5, 6.8, 6.9
    • None
    • e1217cc52 (dev), 24d3a2fa4 (dev), e4495d832 (6.8), fe76b9e47 (dev), 63db1082c (dev)

      A response from the Google Font service

      % curl 'https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL,GRAD@20,100,0..1,200&icon_names=home,settings'

      will be a CSS document like

       @font-face {
        font-family: 'Material Symbols Sharp';
        font-style: normal;
        font-weight: 100;
        src: url(https://fonts.gstatic.com/icon/font?kit=gNNBW2J8Roq16WD5tFNRaeLQk6-SHQ_R00k4c2_whPnoY9ruReaU4bHmz74m0ZkGH-VBYe1x0TV6x4yFH8F-H_OdzEL3sVTgJtfbYxOLozCOV1GblDyAqITBwFmMeu2oog&skey=b2b11cf3b396438f&v=v216) format('truetype');
      }
      @font-face {
        font-family: 'Material Symbols Sharp';
        font-style: normal;
        font-weight: 100;
        src: url(https://fonts.gstatic.com/icon/font?kit=gNNBW2J8Roq16WD5tFNRaeLQk6-SHQ_R00k4c2_whPnoY9ruReYU3rHmz74m0ZkGH-VBYe1x0TV6x4yFH8F-H_OdzEL3sVTgJtfbYxOLozCOV1GblDyAqITBwFmMeu2oog&skey=b2b11cf3b396438f&v=v216) format('truetype');
      }
      .material-symbols-sharp {
        font-family: 'Material Symbols Sharp';
        font-weight: normal;
        font-style: normal;
        font-size: 24px;
        line-height: 1;
        letter-spacing: normal;
        text-transform: none;
        display: inline-block;
        white-space: nowrap;
        word-wrap: normal;
        direction: ltr;
      }

      The Qt CSS parser doesn't accept the url() syntax in this CSS document, as the generated lexer will treat the token after the function as an identifier, which has to be alphanumerical.

      A quoted URL string works, but that's not what we get.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            hatemelkharashy Hatem ElKharashy
            vhilshei Volker Hilsheimer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes