Commits

Virgil Dupras committed ff64e34

Added util.escapeamp()

Comments (0)

Files changed (1)

         sys.stderr = SysWrapper()
     if sys.stdout is None:
         sys.stdout = SysWrapper()
+
+def escapeamp(s):
+    # Returns `s` with escaped ampersand (& --> &&). QAction text needs to have & escaped because
+    # that character is used to define "accel keys".
+    return s.replace('&', '&&')