Index: /trunk/src/bp-core/classes/class-bp-admin.php
===================================================================
--- /trunk/src/bp-core/classes/class-bp-admin.php	(revision 11807)
+++ /trunk/src/bp-core/classes/class-bp-admin.php	(revision 11808)
@@ -577,14 +577,14 @@
 								<ul>
 									<?php if ( bp_is_active( 'members' ) ) : ?>
-										<li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Add User Profile Fields', 'buddypress' ) . '</a>', esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-profile-setup' ), 'users.php' ) ) ) ); ?></li>
+										<li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Add User Profile Fields', 'buddypress' ) . '</a>', esc_url( add_query_arg( array( 'page' => 'bp-profile-setup' ), bp_get_admin_url( 'users.php' ) ) ) ); ?></li>
 									<?php endif; ?>
-									<li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Manage User Signups', 'buddypress' ) . '</a>', esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-signups' ), 'users.php' ) ) ) ); ?></li>
+									<li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Manage User Signups', 'buddypress' ) . '</a>', esc_url( add_query_arg( array( 'page' => 'bp-signups' ), bp_get_admin_url( 'users.php' ) ) ) ); ?></li>
 									<?php if ( bp_is_active( 'activity' ) ) : ?>
-										<li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Moderate Activity Streams', 'buddypress' ) . '</a>', esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-activity' ), 'admin.php' ) ) ) ); ?></li>
+										<li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Moderate Activity Streams', 'buddypress' ) . '</a>', esc_url( add_query_arg( array( 'page' => 'bp-activity' ), bp_get_admin_url( 'admin.php' ) ) ) ); ?></li>
 									<?php endif; ?>
 									<?php if ( bp_is_active( 'groups' ) ) : ?>
-										<li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Manage Groups', 'buddypress' ) . '</a>', esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-groups' ), 'admin.php' ) ) ) ); ?></li>
+										<li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Manage Groups', 'buddypress' ) . '</a>', esc_url( add_query_arg( array( 'page' => 'bp-groups' ), bp_get_admin_url( 'admin.php' ) ) ) ); ?></li>
 									<?php endif; ?>
-									<li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Repair Data', 'buddypress' ) . '</a>', esc_url( bp_get_admin_url( add_query_arg( array( 'page' => 'bp-tools' ), 'tools.php' ) ) ) ); ?>
+									<li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Repair Data', 'buddypress' ) . '</a>', esc_url( add_query_arg( array( 'page' => 'bp-tools' ), bp_get_admin_url( 'tools.php' ) ) ) ); ?>
 									</li>
 								</ul>
Index: /trunk/src/bp-xprofile/bp-xprofile-admin.php
===================================================================
--- /trunk/src/bp-xprofile/bp-xprofile-admin.php	(revision 11807)
+++ /trunk/src/bp-xprofile/bp-xprofile-admin.php	(revision 11808)
@@ -125,4 +125,13 @@
 function xprofile_admin_screen( $message = '', $type = 'error' ) {
 
+	// Users admin URL
+	$url = bp_get_admin_url( 'users.php' );
+
+	// Add Group
+	$add_group_url = add_query_arg( array(
+		'page' => 'bp-profile-setup',
+		'mode' => 'add_group'
+	), $url );
+
 	// Validate type.
 	$type = preg_replace( '|[^a-z]|i', '', $type );
@@ -138,5 +147,5 @@
 			<h1 class="wp-heading-inline"><?php _ex( 'Profile Fields', 'Settings page header', 'buddypress'); ?></h1>
 
-				<a id="add_group" class="page-title-action" href="users.php?page=bp-profile-setup&amp;mode=add_group"><?php _e( 'Add New Field Group', 'buddypress' ); ?></a>
+				<a id="add_group" class="page-title-action" href="<?php echo esc_url( $add_group_url ); ?>"><?php _e( 'Add New Field Group', 'buddypress' ); ?></a>
 
 			<hr class="wp-header-end">
@@ -146,5 +155,5 @@
 			<h1>
 				<?php _ex( 'Profile Fields', 'Settings page header', 'buddypress'); ?>
-				<a id="add_group" class="add-new-h2" href="users.php?page=bp-profile-setup&amp;mode=add_group"><?php _e( 'Add New Field Group', 'buddypress' ); ?></a>
+				<a id="add_group" class="add-new-h2" href="<?php echo esc_url( $add_group_url ); ?>"><?php _e( 'Add New Field Group', 'buddypress' ); ?></a>
 			</h1>
 
@@ -190,5 +199,26 @@
 				</ul>
 
-				<?php if ( !empty( $groups ) ) : foreach ( $groups as $group ) : ?>
+				<?php if ( !empty( $groups ) ) : foreach ( $groups as $group ) :
+
+					// Add Field to Group URL
+					$add_field_url = add_query_arg( array(
+						'page'     => 'bp-profile-setup',
+						'mode'     => 'add_field',
+						'group_id' => (int) $group->id
+					), $url );
+
+					// Edit Group URL
+					$edit_group_url = add_query_arg( array(
+						'page'     => 'bp-profile-setup',
+						'mode'     => 'edit_group',
+						'group_id' => (int) $group->id
+					), $url );
+
+					// Delete Group URL
+					$delete_group_url = wp_nonce_url( add_query_arg( array(
+						'page'     => 'bp-profile-setup',
+						'mode'     => 'delete_group',
+						'group_id' => (int) $group->id
+					), $url ), 'bp_xprofile_delete_group' ); ?>
 
 					<noscript>
@@ -202,11 +232,11 @@
 						<div class="tab-toolbar">
 							<div class="tab-toolbar-left">
-								<a class="button-primary" href="users.php?page=bp-profile-setup&amp;group_id=<?php echo esc_attr( $group->id ); ?>&amp;mode=add_field"><?php _e( 'Add New Field', 'buddypress' ); ?></a>
-								<a class="button edit" href="users.php?page=bp-profile-setup&amp;mode=edit_group&amp;group_id=<?php echo esc_attr( $group->id ); ?>"><?php _ex( 'Edit Group', 'Edit Profile Fields Group', 'buddypress' ); ?></a>
+								<a class="button-primary" href="<?php echo esc_url( $add_field_url ); ?>"><?php _e( 'Add New Field', 'buddypress' ); ?></a>
+								<a class="button edit" href="<?php echo esc_url( $edit_group_url ); ?>"><?php _ex( 'Edit Group', 'Edit Profile Fields Group', 'buddypress' ); ?></a>
 
 								<?php if ( $group->can_delete ) : ?>
 
 									<div class="delete-button">
-										<a class="confirm submitdelete deletion ajax-option-delete" href="<?php echo esc_url( wp_nonce_url( 'users.php?page=bp-profile-setup&amp;mode=delete_group&amp;group_id=' . intval( $group->id ), 'bp_xprofile_delete_group' ) ); ?>"><?php _ex( 'Delete Group', 'Delete Profile Fields Group', 'buddypress' ); ?></a>
+										<a class="confirm submitdelete deletion ajax-option-delete" href="<?php echo esc_url( $delete_group_url ); ?>"><?php _ex( 'Delete Group', 'Delete Profile Fields Group', 'buddypress' ); ?></a>
 									</div>
 
@@ -284,5 +314,5 @@
 
 					<div id="message" class="error"><p><?php _ex( 'You have no groups.', 'You have no profile fields groups.', 'buddypress' ); ?></p></div>
-					<p><a href="users.php?page=bp-profile-setup&amp;mode=add_group"><?php _ex( 'Add New Group', 'Add New Profile Fields Group', 'buddypress' ); ?></a></p>
+					<p><a href="<?php echo esc_url( $add_group_url ); ?>"><?php _ex( 'Add New Group', 'Add New Profile Fields Group', 'buddypress' ); ?></a></p>
 
 				<?php endif; ?>
@@ -620,25 +650,23 @@
 	$field = $admin_field;
 
-	$field_edit_url = add_query_arg(
-		array(
+	// Users admin URL
+	$url = bp_get_admin_url( 'users.php' );
+
+	// Edit
+	$field_edit_url = add_query_arg( array(
+		'page'     => 'bp-profile-setup',
+		'mode'     => 'edit_field',
+		'group_id' => (int) $field->group_id,
+		'field_id' => (int) $field->id
+	), $url );
+
+	// Delete
+	if ( $field->can_delete ) {
+		$field_delete_url = add_query_arg( array(
 			'page'     => 'bp-profile-setup',
-			'group_id' => (int) $field->group_id,
-			'field_id' => (int) $field->id,
-			'mode'     => 'edit_field'
-		),
-		bp_get_admin_url( 'users.php' )
-	);
-
-	if ( $field->can_delete ) {
-		$field_delete_url = add_query_arg(
-			array(
-				'page'     => 'bp-profile-setup',
-				'field_id' => (int) $field->id,
-				'mode'     => 'delete_field'
-			),
-			bp_get_admin_url( 'users.php' ) . '#tabs-' . (int) $field->group_id
-		);
-	}
-	?>
+			'mode'     => 'delete_field',
+			'field_id' => (int) $field->id
+		), $url . '#tabs-' . (int) $field->group_id );
+	} ?>
 
 	<fieldset id="draggable_field_<?php echo esc_attr( $field->id ); ?>" class="sortable<?php echo ' ' . $field->type; if ( !empty( $class ) ) echo ' ' . $class; ?>">
@@ -647,7 +675,7 @@
 				<?php bp_the_profile_field_name(); ?>
 
-				<?php if ( empty( $field->can_delete )                                    ) : ?><?php esc_html_e( '(Primary)',  'buddypress' ); endif; ?>
+				<?php if ( empty( $field->can_delete )                                    ) : ?><?php esc_html_e( '(Primary)', 'buddypress' ); endif; ?>
 				<?php bp_the_profile_field_required_label(); ?>
-				<?php if ( bp_xprofile_get_meta( $field->id, 'field', 'signup_position' ) ) : ?><?php esc_html_e( '(Sign-up)',  'buddypress' ); endif; ?>
+				<?php if ( bp_xprofile_get_meta( $field->id, 'field', 'signup_position' ) ) : ?><?php esc_html_e( '(Sign-up)', 'buddypress' ); endif; ?>
 				<?php if ( bp_get_member_types() ) : echo $field->get_member_type_label(); endif; ?>
 
Index: /trunk/src/bp-xprofile/classes/class-bp-xprofile-field.php
===================================================================
--- /trunk/src/bp-xprofile/classes/class-bp-xprofile-field.php	(revision 11807)
+++ /trunk/src/bp-xprofile/classes/class-bp-xprofile-field.php	(revision 11808)
@@ -1164,8 +1164,17 @@
 	 */
 	public function render_admin_form( $message = '' ) {
+
+		// Users Admin URL
+		$users_url = bp_get_admin_url( 'users.php' );
+
+		// Add New
 		if ( empty( $this->id ) ) {
 			$title  = __( 'Add New Field', 'buddypress' );
-			$action	= "users.php?page=bp-profile-setup&amp;group_id=" . $this->group_id . "&amp;mode=add_field#tabs-" . $this->group_id;
-			$button	= __( 'Save', 'buddypress' );
+			$button	= __( 'Save',          'buddypress' );
+			$action = add_query_arg( array(
+				'page'     => 'bp-profile-setup',
+				'mode'     => 'add_field',
+				'group_id' => (int) $this->group_id
+			), $users_url . '#tabs-' . (int) $this->group_id );
 
 			if ( !empty( $_POST['saveField'] ) ) {
@@ -1180,8 +1189,15 @@
 				}
 			}
+
+		// Edit
 		} else {
 			$title  = __( 'Edit Field', 'buddypress' );
-			$action = "users.php?page=bp-profile-setup&amp;mode=edit_field&amp;group_id=" . $this->group_id . "&amp;field_id=" . $this->id . "#tabs-" . $this->group_id;
-			$button	= __( 'Update', 'buddypress' );
+			$button	= __( 'Update',     'buddypress' );
+			$action = add_query_arg( array(
+				'page'     => 'bp-profile-setup',
+				'mode'     => 'edit_field',
+				'group_id' => (int) $this->group_id,
+				'field_id' => (int) $this->id
+			), $users_url . '#tabs-' . (int) $this->group_id );
 		} ?>
 
@@ -1287,4 +1303,10 @@
 	private function submit_metabox( $button_text = '' ) {
 
+		// Setup the URL for deleting
+		$users_url  = bp_get_admin_url( 'users.php' );
+		$cancel_url = add_query_arg( array(
+			'page' => 'bp-profile-setup'
+		), $users_url );
+
 		/**
 		 * Fires before XProfile Field submit metabox.
@@ -1324,5 +1346,5 @@
 
 						<div id="delete-action">
-							<a href="users.php?page=bp-profile-setup" class="deletion"><?php esc_html_e( 'Cancel', 'buddypress' ); ?></a>
+							<a href="<?php echo esc_url( $cancel_url ); ?>" class="deletion"><?php esc_html_e( 'Cancel', 'buddypress' ); ?></a>
 						</div>
 
Index: /trunk/src/bp-xprofile/classes/class-bp-xprofile-group.php
===================================================================
--- /trunk/src/bp-xprofile/classes/class-bp-xprofile-group.php	(revision 11807)
+++ /trunk/src/bp-xprofile/classes/class-bp-xprofile-group.php	(revision 11808)
@@ -717,15 +717,30 @@
 		global $message;
 
+		// Users Admin URL
+		$users_url = bp_get_admin_url( 'users.php' );
+
+		// URL to cancel to
+		$cancel_url = add_query_arg( array(
+			'page' => 'bp-profile-setup'
+		), $users_url );
+
 		// New field group.
 		if ( empty( $this->id ) ) {
 			$title	= __( 'Add New Field Group', 'buddypress' );
-			$action	= add_query_arg( array( 'page' => 'bp-profile-setup', 'mode' => 'add_group' ), 'users.php' );
-			$button	= __( 'Save', 'buddypress' );
+			$button	= __( 'Save',                'buddypress' );
+			$action	= add_query_arg( array(
+				'page' => 'bp-profile-setup',
+				'mode' => 'add_group'
+			), $users_url );
 
 		// Existing field group.
 		} else {
 			$title  = __( 'Edit Field Group', 'buddypress' );
-			$action	= add_query_arg( array( 'page' => 'bp-profile-setup', 'mode' => 'edit_group', 'group_id' => $this->id ), 'users.php' );
-			$button	= __( 'Update', 'buddypress' );
+			$button	= __( 'Update',           'buddypress' );
+			$action	= add_query_arg( array(
+				'page'     => 'bp-profile-setup',
+				'mode'     => 'edit_group',
+				'group_id' => (int) $this->id
+			), $users_url );
 		} ?>
 
@@ -814,5 +829,5 @@
 											</div>
 											<div id="delete-action">
-												<a href="users.php?page=bp-profile-setup" class="deletion"><?php _e( 'Cancel', 'buddypress' ); ?></a>
+												<a href="<?php echo esc_url( $cancel_url ); ?>" class="deletion"><?php _e( 'Cancel', 'buddypress' ); ?></a>
 											</div>
 											<div class="clear"></div>
