Skip to main content

Bug Tracker

Side navigation

Ticket #4567: removenbsp.patch
File removenbsp.patch, 15.6 KB (added by serialseb, April 21, 2009 07:07PM UTC)

Removing nbsp from most libraries

��Index: plugins/window/window.js

===================================================================

--- plugins/window/window.js	(revision 6309)

+++ plugins/window/window.js	(working copy)

@@ -740,7 +740,7 @@

 				}

 

 				// Create new content DIV

-				objWindow.jw.objqContent = jQuery('<div class="jwContent">&nbsp;</div>').css({

+				objWindow.jw.objqContent = jQuery('<div class="jwContent">&#160;</div>').css({

 													display: 'block',

 													overflow: 'auto'

 												});

@@ -816,7 +816,7 @@

 			if (!objWindow.jw.objqBtnMinimize) {

 				// Create the button

 		 		objWindow.jw.objqBtnMinimize = jQuery(document.createElement("div"))

-		 						.html('&nbsp;')

+		 						.html('&#160;')

 		 						.addClass('btnMinimize')

 		 						.css({

 										fontSize: '1px',

@@ -885,7 +885,7 @@

 			if (!objWindow.jw.objqBtnMaximize) {

 				// Create the button

 		 		objWindow.jw.objqBtnMaximize = jQuery(document.createElement("div"))

-		 						.html('&nbsp;')

+		 						.html('&#160;')

 		 						.addClass('btnMaximize')

 		 						.css({

 										fontSize: '1px',

@@ -954,7 +954,7 @@

 		if (blnValue) {

 			if (!objWindow.jw.objqBtnClose) {

 		 		objWindow.jw.objqBtnClose = jQuery(document.createElement("div"))

-		 						.html('&nbsp;')

+		 						.html('&#160;')

 		 						.addClass('btnClose')

 		 						.css({

 										fontSize: '1px',

@@ -1179,7 +1179,7 @@

 							display: 'block',

 							width: strWidth,

 							height: strHeight

-					}).html('&nbsp;');

+			    }).html('&#160;');

 

 					// Make sure the jwHelper class is on the helper, so it gets pushed on top.

 					jQuery.iDrag.helper.addClass('jwHelper');

@@ -1327,7 +1327,7 @@

 					});

 		} else {

 			objWindow.jw.objqStatus

-				.html('&nbsp;')

+				.html('&#160;')

 				.css({

 						fontSize: '1px',

 						lineHeight: '1px'

@@ -1426,7 +1426,7 @@

 			jqWindow.blnInitialized = true;

 

 			// Create helper (for resizing and transferring)

-			jqWindow.objqHelper = jQuery('<div class="jwHelper">&nbsp;</div>');

+			jqWindow.objqHelper = jQuery('<div class="jwHelper">&#160;</div>');

 			jQuery('body', document).append(jqWindow.objqHelper);

 

 			// Assign document event handlers

@@ -1487,7 +1487,7 @@

 						intInitialSate: 0,						// Initial state: minimized (-1), default (0), maximized (1)

 						dblOpacity: 1.0,							// The opacity of the dialog

 						strTitle: 'Title',						// ...

-						strContent: '&nbsp;',					// ...

+						strContent: '&#160;', 				// ...

 						strStatus: ''									// ...

 					}, cfgOptions || {});

 			};

@@ -1580,27 +1580,27 @@

 		// Add the header part

 		strHTML+= '<table cellspacing="0" cellpadding="0" border="0" class="jwTitle">';

 			strHTML+= '<tr>';

-			strHTML+= '<td class="jwTitleL">&nbsp;</td>';

-			strHTML+= '<td class="jwTitleC">&nbsp;</td>';

-			strHTML+= '<td class="jwTitleR">&nbsp;</td>';

+			strHTML+= '<td class="jwTitleL">&#160;</td>';

+			strHTML+= '<td class="jwTitleC">&#160;</td>';

+			strHTML+= '<td class="jwTitleR">&#160;</td>';

 			strHTML+= '</tr>';

 		strHTML+= '</table>';

 

 		// Add the content part

 		strHTML+= '<table cellspacing="0" cellpadding="0" border="0" class="jwContent">';

 			strHTML+= '<tr>';

-			strHTML+= '<td class="jwContentL">&nbsp;</td>';

-			strHTML+= '<td class="jwContentC">&nbsp;</td>';

-			strHTML+= '<td class="jwContentR">&nbsp;</td>';

+			strHTML+= '<td class="jwContentL">&#160;</td>';

+			strHTML+= '<td class="jwContentC">&#160;</td>';

+			strHTML+= '<td class="jwContentR">&#160;</td>';

 			strHTML+= '</tr>';

 		strHTML+= '</table>';

 

 		// Add the footer

 		strHTML+= '<table cellspacing="0" cellpadding="0" border="0" class="jwStatus">';

 			strHTML+= '<tr>';

-			strHTML+= '<td class="jwStatusL">&nbsp;</td>';

-			strHTML+= '<td class="jwStatusC">&nbsp;</td>';

-			strHTML+= '<td class="jwStatusR">&nbsp;</td>';

+			strHTML+= '<td class="jwStatusL">&#160;</td>';

+			strHTML+= '<td class="jwStatusC">&#160;</td>';

+			strHTML+= '<td class="jwStatusR">&#160;</td>';

 			strHTML+= '</tr>';

 		strHTML+= '</table>';

 

Index: plugins/validate.password/jquery.validate.password.js

===================================================================

--- plugins/validate.password/jquery.validate.password.js	(revision 6309)

+++ plugins/validate.password/jquery.validate.password.js	(working copy)

@@ -67,8 +67,8 @@

 		.text($.validator.passwordRating.messages[rating.messageKey]);

 		// display process bar instead of error message

 		

-		return rating.rate > 2;

-	}, "&nbsp;");

+		return rating.rate > 2;

+    }, "&#160;");

 	// manually add class rule, to make username param optional

 	$.validator.classRuleSettings.password = { password: true };

 	

Index: plugins/interface/isortables.js

===================================================================

--- plugins/interface/isortables.js	(revision 6309)

+++ plugins/interface/isortables.js	(working copy)

@@ -112,7 +112,7 @@

 			jQuery(e).DraggableDestroy();

 			jQuery(jQuery.iDrop.overzone).SortableAddItem(e);

 		}

-		jQuery.iSort.helper.removeClass(e.dragCfg.hpc).html('&nbsp;');

+		jQuery.iSort.helper.removeClass(e.dragCfg.hpc).html('&#160;');

 		jQuery.iSort.inFrontOf = null;

 		var shs = jQuery.iSort.helper.get(0).style;

 		shs.display = 'none';

@@ -282,7 +282,7 @@

 	{

 		if (o.accept && jQuery.iUtil && jQuery.iDrag && jQuery.iDrop) {

 			if (!jQuery.iSort.helper) {

-				jQuery('body',document).append('<div id="sortHelper">&nbsp;</div>');

+				jQuery('body',document).append('<div id="sortHelper">&#160;</div>');

 				jQuery.iSort.helper = jQuery('#sortHelper');

 				jQuery.iSort.helper.get(0).style.display = 'none';

 			}

Index: plugins/thickbox/thickbox-code/thickbox.js

===================================================================

--- plugins/thickbox/thickbox-code/thickbox.js	(revision 6309)

+++ plugins/thickbox/thickbox-code/thickbox.js	(working copy)

@@ -82,12 +82,12 @@

 						if (!(TB_TempArray[TB_Counter].href == url)) {						

 							if (TB_FoundURL) {

 								TB_NextCaption = TB_TempArray[TB_Counter].title;

-								TB_NextURL = TB_TempArray[TB_Counter].href;

-								TB_NextHTML = "<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>";

+								TB_NextURL = TB_TempArray[TB_Counter].href;

+								TB_NextHTML = "<span id='TB_next'>&#160;&#160;<a href='#'>Next &gt;</a></span>";

 							} else {

 								TB_PrevCaption = TB_TempArray[TB_Counter].title;

-								TB_PrevURL = TB_TempArray[TB_Counter].href;

-								TB_PrevHTML = "<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>";

+								TB_PrevURL = TB_TempArray[TB_Counter].href;

+								TB_PrevHTML = "<span id='TB_prev'>&#160;&#160;<a href='#'>&lt; Prev</a></span>";

 							}

 						} else {

 							TB_FoundURL = true;

Index: plugins/thickbox/js/global.js

===================================================================

--- plugins/thickbox/js/global.js	(revision 6309)

+++ plugins/thickbox/js/global.js	(working copy)

@@ -77,7 +77,7 @@

 		  code=code.replace(/\t/g,'  ');

 		  code=code.replace(/\r?\n/g,'<br>');

 		  code=code.replace(/<br><br>/g,'<br>');

-		  code=code.replace(/ /g,'&nbsp;');

+		  code=code.replace(/ /g,'&#160;');

 		 $('#'+placement).html(code);

 	}

 	);

@@ -314,10 +314,10 @@

 				});

 				parsed = parsed.replace(/\n( *)/g, function() { 

 					var spaces = "";

-					for (var i = 0; i < arguments[1].length; i++) spaces+= "&nbsp;";

+					for (var i = 0; i < arguments[1].length; i++) spaces+= "&#160;";

 					return "\n" + spaces;  

-				});

-				parsed = parsed.replace(/\t/g, "&nbsp;&nbsp;&nbsp;&nbsp;");

+				});

+				parsed = parsed.replace(/\t/g, "&#160;&#160;&#160;&#160;");

 				parsed = parsed.replace(/\n(<\/\w+>)?/g, "<br />$1").replace(/<br \/>[\n\r\s]*<br \/>/g, "<p><br></p>");

 				

 			} else parsed = parse(stylableEls[i].innerHTML, styleSet.ignoreCase);

Download in other formats:

Original Format