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

html parser for img tag and its attributes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.2
    • GUI: Text handling
    • None

      The only thing mentioned by docs is:

      Text.StyledText parser is strict, requiring tags to be correctly nested.

      Some observations:

          // ### GOOD
          // <  img src=\"images/face-smile.png\">
          // rich text: ok
          // styled text: ok
      
          // ### GOOD
          // <img src=\"images/face-smile.png   \">
          // rich text: Cannot open: qrc:/images/face-smile.png
          // styled text: Cannot open: qrc:/images/face-smile.png
      
          // ### INCONSISTENT
          // <img src =\"images/face-smile.png\">"
          // rich text: ok
          // styled text: "QML QQuickText: Error decoding: qrc:/Main.qml: Unsupported image format"
      
          // ### INCONSISTENT
          // <img src=  \"images/face-smile.png\">"
          // rich text: ok
          // styled text: "QML QQuickText: Error decoding: qrc:/Main.qml: Unsupported image format"
      
          // ### INCONSISTENT
          // <img src=\"images/face-smile.png\" align  =  \"middle\">"
          // rich text: ok
          // styled text: seems to ignore and renders as default align, which is "bottom"
      

      Not sure what the HTML spec says about this, but handling all those spaces at various locations does seem like unnecessary overhead. But maybe it is needed because HTML that comes web is often assembled on-the-fly and nobody cares too much about introducing spaces here and there because HTML parser is suppose to deal with it?

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

            esabraha Eskil Abrahamsen Blomfeldt
            paeglis Gatis Paeglis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes