From: toshihiro Date: Sun, 29 Jul 2007 12:13:51 +0000 (+0000) Subject: Last revision could not handle URL encoding such as %20. X-Git-Url: http://secure.phpeclipse.com?hp=91b640729a8a8c449ee2df93647691cfb2c94bd2 Last revision could not handle URL encoding such as %20. --- diff --git a/net.sourceforge.phpeclipse.webbrowser/src/net/sourceforge/phpeclipse/webbrowser/views/BrowserView.java b/net.sourceforge.phpeclipse.webbrowser/src/net/sourceforge/phpeclipse/webbrowser/views/BrowserView.java index 52f6ab4..852b24d 100644 --- a/net.sourceforge.phpeclipse.webbrowser/src/net/sourceforge/phpeclipse/webbrowser/views/BrowserView.java +++ b/net.sourceforge.phpeclipse.webbrowser/src/net/sourceforge/phpeclipse/webbrowser/views/BrowserView.java @@ -10,6 +10,10 @@ *******************************************************************************/ package net.sourceforge.phpeclipse.webbrowser.views; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import java.nio.charset.Charset; + import net.sourceforge.phpeclipse.webbrowser.internal.WebBrowser; import net.sourceforge.phpeclipse.webbrowser.internal.WebBrowserUtil; @@ -124,8 +128,16 @@ public class BrowserView extends ViewPart implements IShowInTarget { setUrl(url); } else { Browser browser = fInstance.getBrowser(); - if (browser != null && !browser.getUrl().equals(url)) { - setUrl(url); + if (browser != null) { + String browserUrl = browser.getUrl(); + try { + browserUrl = URLDecoder.decode(browserUrl, Charset.defaultCharset().name()); + } catch (UnsupportedEncodingException e) { + // e.printStackTrace(); + } + if (!url.equals(browserUrl)) { + setUrl(url); + } } } }