Prevent opening urls with cid/data scheme

This commit is contained in:
M66B 2019-03-13 17:03:54 +00:00
parent 3cba52c437
commit fbab61a0b9
1 changed files with 7 additions and 1 deletions

View File

@ -1446,7 +1446,13 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
webView.setWebViewClient(new WebViewClient() {
public boolean shouldOverrideUrlLoading(WebView view, String url) {
onOpenLink(Uri.parse(url));
Log.i("Open url=" + url);
Uri uri = Uri.parse(url);
if ("cid".equals(uri.getScheme()) || "data".equals(uri.getScheme()))
return false;
onOpenLink(uri);
return true;
}
});