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

HTML attributes are overwritten when editing text

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.12.11, 5.15.5
    • Fix Version/s: None
    • Labels:
    • Environment:
      Microsoft Visual Studio 2017 64-bit and Visual Studio 2019 64-bit
    • Platform/s:
      Windows

      Description

      This issue is affecting the Norwix professional services project. Norwix does not want links to be underlined in their application.

       

      When using TextEdit in QML with textFormat set to Text.RichText, and the text is set to contain an HTML anchor with underline turned off

      text: "<a style=\"text-decoration:none;\">A LINK</a>
      

      TextEdit will change the  text to something like

      <a><span style="color:#0000ff;">A LINK</span></a>

      and remove the text-decoration attribute completely.

      Attached is an example project. When running the example, change some of the text in the top TextEdit and see the same text appear in the bottom TextEdit, but with the link underlined. The Application Output also prints out the values of TextEdit.text, showing BOTH text as modified.

        Attachments

        1. RichTextUnderlineBug.7z
          4 kB
          Michael Szczerba

          Issue Links

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

            Activity

              People

              Assignee:
              esabraha Eskil Abrahamsen Blomfeldt
              Reporter:
              michael.s Michael Szczerba
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes