Commits

Aleš Erjavec  committed a646b4d

Fixed scheme description text formating.

  • Participants
  • Parent commits 7ff71ab

Comments (0)

Files changed (1)

File Orange/OrangeCanvas/preview/previewbrowser.py

 
 """
 
+from xml.sax.saxutils import escape
+
 from PyQt4.QtGui import (
     QWidget, QLabel, QListView, QAction, QVBoxLayout, QHBoxLayout, QSizePolicy,
     QStyleOption, QStylePainter
             if not description:
                 description = "No description."
 
+            description = escape(description)
+            description = description.replace("\n", "<br/>")
+
             name = unicode(index.data(Qt.DisplayRole).toString())
             if not name:
                 name = "Untitled"
 
+            name = escape(name)
             path = unicode(index.data(Qt.StatusTipRole).toString())
 
             svg = unicode(index.data(previewmodel.ThumbnailSVGRole).toString())