Commits

Erik Grinaker committed dcf6472

strip xml entities from password on clipboard copy or drag/drop

  • Participants
  • Parent commits de53973

Comments (0)

Files changed (5)

 
 ---------------[ xxxx-xx-xx : 0.4.6 ]---------------
 
+2006-01-20  Erik Grinaker <erikg@codepoet.no>
+
+	* strip xml entities from password on clipboard copy or
+	drag/drop
+
 2006-01-19  Erik Grinaker <erikg@codepoet.no>
 
 	* fixed drag and drop undo/redo crashes
 Bugfixes:
 - fixed drag and drop undo/redo crashes
 - don't initialize python modules during configure checks
+- strip xml entities from password on clipboard copy or drag/drop
 - changed button "Edit" to "Update" in edit entry dialog
 - use full path when starting Revelation from applet
 - use correct key path for applet show_passwords gconf schema key
 - sorting of the tree
 - string cleanups
 - add binary entropy check to password checker
-- fix drag/drop undo crashes
 - make result label in password checker wrap when text overflows
 - use icons instead of colors in password entry to indicate strength
   (see: epiphany address entry)

File src/lib/ui.py

 	def __init__(self, password = "", cfg = None, clipboard = None, justify = gtk.JUSTIFY_LEFT):
 		EventBox.__init__(self)
 
-		self.password	= password
+		self.password	= util.unescape_markup(password)
 		self.config	= cfg
 		self.clipboard	= clipboard
 
-		self.label = Label(password, justify)
+		self.label = Label(util.escape_markup(self.password), justify)
 		self.label.set_selectable(True)
 		self.add(self.label)
 
 		"Sets whether to display the password"
 
 		if show == True:
-			self.label.set_text(self.password)
+			self.label.set_text(util.escape_markup(self.password))
 			self.label.set_selectable(True)
 			self.drag_source_unset()
 

File src/lib/util.py

 
 	return trace.getvalue()
 
+
+def unescape_markup(string):
+	"Unescapes a string to get literal values"
+
+	string = string.replace("&amp;", "&")
+	string = string.replace("&lt;", "<")
+	string = string.replace("&gt;", ">")
+
+	return string
+