Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 77840
Collapse All | Expand All

(-)Eclipse UI/org/eclipse/ui/internal/dialogs/ProductInfoDialog.java (-2 / +28 lines)
Lines 350-359 Link Here
350
		Thread launcher = new Thread("About Link Launcher") {//$NON-NLS-1$
350
		Thread launcher = new Thread("About Link Launcher") {//$NON-NLS-1$
351
			public void run() {
351
			public void run() {
352
				try {
352
				try {
353
					/*
354
					 * encoding the href as the browser does not open if there
355
					 * is a space in the url. Bug 77840
356
					 */
357
					String encodedLocalHref = urlEncodeForSpaces(localHref
358
							.toCharArray());
359
353
					if (webBrowserOpened) {
360
					if (webBrowserOpened) {
354
						Runtime.getRuntime().exec(webBrowser + " -remote openURL(" + localHref + ")"); //$NON-NLS-1$ //$NON-NLS-2$
361
						Runtime.getRuntime().exec(webBrowser + " -remote openURL(" + encodedLocalHref + ")"); //$NON-NLS-1$ //$NON-NLS-2$ // 77840
355
					} else {
362
					} else {
356
						Process p = openWebBrowser(localHref);
363
						Process p = openWebBrowser(encodedLocalHref); // 77840
357
						webBrowserOpened = true;
364
						webBrowserOpened = true;
358
						try {
365
						try {
359
							if (p != null)
366
							if (p != null)
Lines 371-376 Link Here
371
		};
378
		};
372
		launcher.start();
379
		launcher.start();
373
	}
380
	}
381
}
382
383
/**
384
 * This method encodes the url, removes the spaces from the url and replaces
385
 * the same with <code>"%20"</code>. This method is required to fix Bug
386
 * 77840.
387
 * 
388
 * @since 3.0.2
389
 */
390
private String urlEncodeForSpaces(char[] input) {
391
	StringBuffer retu = new StringBuffer(input.length);
392
	for (int i = 0; i < input.length; i++) {
393
		if (input[i] == ' ')
394
			retu.append("%20");
395
		else
396
			retu.append(input[i]);
397
	}
398
	return retu.toString();
399
374
}
400
}
375
401
376
/**
402
/**

Return to bug 77840