From 86f3e951f703faa9b6b700f8982a13768906706e Mon Sep 17 00:00:00 2001 From: toshihiro Date: Sun, 29 Jul 2007 12:13:51 +0000 Subject: [PATCH] Last revision could not handle URL encoding such as %20. --- .../phpeclipse/webbrowser/views/BrowserView.java | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) 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); + } } } } -- 1.7.1