forked from github/cordova-android
Fixing work-around to work for both ? and #
This commit is contained in:
parent
adc88f01b7
commit
d1905dbee8
@ -461,7 +461,7 @@ public class CordovaWebViewClient extends WebViewClient {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WebResourceResponse shouldInterceptRequest(WebView view, String url) {
|
public WebResourceResponse shouldInterceptRequest(WebView view, String url) {
|
||||||
if(url.contains("?")){
|
if(url.contains("?") || url.contains("#")){
|
||||||
return generateWebResourceResponse(url);
|
return generateWebResourceResponse(url);
|
||||||
} else {
|
} else {
|
||||||
return super.shouldInterceptRequest(view, url);
|
return super.shouldInterceptRequest(view, url);
|
||||||
@ -476,6 +476,10 @@ public class CordovaWebViewClient extends WebViewClient {
|
|||||||
if(niceUrl.contains("?")){
|
if(niceUrl.contains("?")){
|
||||||
niceUrl = niceUrl.split("\\?")[0];
|
niceUrl = niceUrl.split("\\?")[0];
|
||||||
}
|
}
|
||||||
|
else if(niceUrl.contains("#"))
|
||||||
|
{
|
||||||
|
niceUrl = niceUrl.split("#")[0];
|
||||||
|
}
|
||||||
|
|
||||||
String mimetype = null;
|
String mimetype = null;
|
||||||
if(niceUrl.endsWith(".html")){
|
if(niceUrl.endsWith(".html")){
|
||||||
|
Loading…
Reference in New Issue
Block a user