diff -u -r1.16 rb-new-station-dialog.c
--- iradio/rb-new-station-dialog.c	14 Jul 2004 03:13:02 -0000	1.16
+++ iradio/rb-new-station-dialog.c	26 Aug 2005 08:19:26 -0000
@@ -273,6 +273,7 @@
 				   RBNewStationDialog *dialog)
 {
 	const char *location;
+	char *trimmed_location;
 	GValue title_val = { 0, };
 	GValue genre_val = { 0, };
 	RhythmDBEntry *entry;
@@ -280,22 +281,26 @@
 		return;
 
 	location = gtk_entry_get_text (GTK_ENTRY (dialog->priv->location));
+	trimmed_location = g_strstrip (g_strdup (location));
+	
 
 	g_value_init (&title_val, G_TYPE_STRING);
 	g_value_set_string (&title_val, gtk_entry_get_text (GTK_ENTRY (dialog->priv->title)));
 	g_value_init (&genre_val, G_TYPE_STRING);
 	g_value_set_string (&genre_val,
 			    gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (dialog->priv->genre)->entry)));
-	entry = rhythmdb_entry_lookup_by_location (dialog->priv->db, location);
+	entry = rhythmdb_entry_lookup_by_location (dialog->priv->db, trimmed_location);
 	if (!entry)
 		entry = rhythmdb_entry_new (dialog->priv->db,
 					    RHYTHMDB_ENTRY_TYPE_IRADIO_STATION,
-					    location);
+					    trimmed_location);
 	rhythmdb_entry_set (dialog->priv->db, entry, RHYTHMDB_PROP_TITLE, &title_val);
 	rhythmdb_entry_set (dialog->priv->db, entry, RHYTHMDB_PROP_GENRE, &genre_val);
 	rhythmdb_commit (dialog->priv->db);
 	g_value_unset (&title_val);
 	g_value_unset (&genre_val);
+
+	g_free (trimmed_location);
 }
 
 static void
