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

QSvgGenerator produces invalid file if description contains invalid character.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.10.1
    • SVG Support
    • None

    Description

      One of my users complained about missing part of an image. Debugging showed that the svg file is corrupted. Looking into file by plain text editor showed that the file contains invalid character "&" in description section. Replacing it with "&" fix the file and missing part repaired again. It seems like some editors try to open file in any cost where other refuse.

      If it is not a bug and QSvgGenerator::setDescription should not escape a text it would be right to add a note about this in documentation.

      It seems like QSvgGenerator::setTitle has similar issue.

      Simply using QString::toHtmlEscaped() before setting description helped me.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            dismine Roman Telezhynskyi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes