Index: common/bluetooth-client.c
===================================================================
--- common/bluetooth-client.c	(revision 575)
+++ common/bluetooth-client.c	(working copy)
@@ -91,6 +91,55 @@
 
 G_DEFINE_TYPE(BluetoothClient, bluetooth_client, G_TYPE_OBJECT)
 
+gchar * clean_alias_string(const gchar *src);
+
+/**
+ * Remove all leading and trailing spaces from the alias string, as well
+ * as any double spacing characters.
+ */
+gchar * clean_alias_string(const gchar *src) {
+	gunichar *unichar_string;
+	gunichar last_char;
+	glong num_chars;
+	gchar *cleaned_string;
+	gchar *dst;
+	int i;
+	
+	if (src == NULL) {
+		return NULL;	
+	}
+
+	unichar_string = g_utf8_to_ucs4_fast(src, -1, &num_chars);
+	cleaned_string = g_malloc( (num_chars * sizeof(gint)) + 1);
+	dst = cleaned_string;
+	
+	last_char = unichar_string[0];
+	for (i = 0; i < num_chars; i++) {
+
+		if (!g_unichar_isprint(unichar_string[i])) {
+			continue;		
+		}
+
+		if (g_unichar_isspace(unichar_string[i]) && 
+			g_unichar_isspace(last_char)) {
+
+			continue;
+		}
+				
+		last_char = unichar_string[i];
+		dst += g_unichar_to_utf8(last_char, dst);
+	}
+
+	if (g_unichar_isspace(last_char)) {
+		dst--;
+	}
+	*dst = '\0';
+
+	g_free(unichar_string);
+	
+	return cleaned_string;
+}
+
 const gchar *bluetooth_type_to_string(guint type)
 {
 	switch (type) {
@@ -406,6 +455,7 @@
 	BluetoothClient *client = BLUETOOTH_CLIENT(user_data);
 	BluetoothClientPrivate *priv = BLUETOOTH_CLIENT_GET_PRIVATE(client);
 	GtkTreeIter iter;
+	gchar *alias;
 
 	DBG("client %p property %s", client, property);
 
@@ -414,14 +464,15 @@
 
 	if (g_str_equal(property, "Name") == TRUE) {
 		const gchar *name = g_value_get_string(value);
-
 		gtk_tree_store_set(priv->store, &iter,
 					BLUETOOTH_COLUMN_NAME, name, -1);
 	} else if (g_str_equal(property, "Alias") == TRUE) {
-		const gchar *alias = g_value_get_string(value);
-
+		alias = clean_alias_string(g_value_get_string(value));
+		
 		gtk_tree_store_set(priv->store, &iter,
 					BLUETOOTH_COLUMN_ALIAS, alias, -1);
+		g_free(alias);
+
 	} else if (g_str_equal(property, "Icon") == TRUE) {
 		const gchar *icon = g_value_get_string(value);
 
@@ -458,7 +509,8 @@
 	BluetoothClientPrivate *priv = BLUETOOTH_CLIENT_GET_PRIVATE(client);
 	DBusGProxy *device;
 	GValue *value;
-	const gchar *address, *alias, *name, *icon;
+	const gchar *address, *name, *icon;
+	gchar *alias;
 	GHashTable *services;
 	gboolean paired, trusted, connected;
 	guint type;
@@ -480,7 +532,7 @@
 		address = value ? g_value_get_string(value) : NULL;
 
 		value = g_hash_table_lookup(hash, "Alias");
-		alias = value ? g_value_get_string(value) : NULL;
+		alias = value ? clean_alias_string(g_value_get_string(value)) : NULL;
 
 		value = g_hash_table_lookup(hash, "Name");
 		name = value ? g_value_get_string(value) : NULL;
@@ -570,6 +622,10 @@
 				G_CALLBACK(device_changed), client, NULL);
 		g_object_unref(device);
 	}
+
+	if(alias != NULL){
+		g_free(alias);	
+	}
 }
 
 static void device_found(DBusGProxy *adapter, const char *address,
