Index: wp-admin/js/user-profile.dev.js
===================================================================
--- wp-admin/js/user-profile.dev.js	(revision 17565)
+++ wp-admin/js/user-profile.dev.js	(working copy)
@@ -45,7 +45,7 @@
 		});
 		$('#first_name, #last_name').blur(function(){
 			var select = $('#display_name');
-			var first = $('#first_name').val(), last = $('#last_name').val();
+			var first = $('#first_name').val(), last = $('#last_name').val().replace(/\'/g, "&#39;");
 			var sel = select.children('option:selected').attr('id');
 			$('#display_firstname, #display_lastname, #display_firstlast, #display_lastfirst').remove();
 			if ( first && ! select.children('option[value=' + first + ']').length )
