Fixing work-around to work for both ? and #

This commit is contained in:
Joe Bowser 2012-06-20 14:16:02 -07:00
parent adc88f01b7
commit d1905dbee8

View File

@ -461,7 +461,7 @@ public class CordovaWebViewClient extends WebViewClient {
@Override
public WebResourceResponse shouldInterceptRequest(WebView view, String url) {
if(url.contains("?")){
if(url.contains("?") || url.contains("#")){
return generateWebResourceResponse(url);
} else {
return super.shouldInterceptRequest(view, url);
@ -476,6 +476,10 @@ public class CordovaWebViewClient extends WebViewClient {
if(niceUrl.contains("?")){
niceUrl = niceUrl.split("\\?")[0];
}
else if(niceUrl.contains("#"))
{
niceUrl = niceUrl.split("#")[0];
}
String mimetype = null;
if(niceUrl.endsWith(".html")){