Specifying base url

Fixes <a href="//example.com"> links
This commit is contained in:
ByteHamster 2019-04-03 18:53:07 +02:00
parent 7a98e3c231
commit ce013bb225
2 changed files with 2 additions and 2 deletions

View File

@ -307,7 +307,7 @@ public class ItemDescriptionFragment extends Fragment implements MediaplayerInfo
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(data -> { .subscribe(data -> {
webvDescription.loadDataWithBaseURL(null, data, "text/html", webvDescription.loadDataWithBaseURL("https://127.0.0.1", data, "text/html",
"utf-8", "about:blank"); "utf-8", "about:blank");
Log.d(TAG, "Webview loaded"); Log.d(TAG, "Webview loaded");
}, error -> Log.e(TAG, Log.getStackTraceString(error))); }, error -> Log.e(TAG, Log.getStackTraceString(error)));

View File

@ -358,7 +358,7 @@ public class ItemFragment extends Fragment implements OnSwipeGesture {
private void onFragmentLoaded() { private void onFragmentLoaded() {
if (webviewData != null) { if (webviewData != null) {
webvDescription.loadDataWithBaseURL(null, webviewData, "text/html", "utf-8", "about:blank"); webvDescription.loadDataWithBaseURL("https://127.0.0.1", webviewData, "text/html", "utf-8", "about:blank");
} }
updateAppearance(); updateAppearance();
} }