title: unable to load html into webview from html string
body: <p>I'm trying to save a page html code into a string, then load it to a webview, I managed to get full HTML code successfully, however when I try to load it into webview, somehow it webview remove all content in </p>
  <p>Here is how I initialized webView:</p>
  <pre><code>WebSettings settings = webView.getSettings();
  settings.setJavaScriptEnabled(true);
  webView.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_OVERLAY);
  webView.getSettings().setBuiltInZoomControls(true);
  webView.getSettings().setUseWideViewPort(true);
  webView.getSettings().setLoadWithOverviewMode(true);
  webView.getSettings().setJavaScriptEnabled(true);
  webView.getSettings().setBuiltInZoomControls(true);
  webView.getSettings().setDomStorageEnabled(true);
  webView.setLayerType(WebView.LAYER_TYPE_SOFTWARE, null);
  webView.getSettings().setGeolocationEnabled(true);
  webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
  webView.setWebViewClient(new MyWebViewClient());
  </code></pre>
  <p>Webclient:</p>
  <pre><code>private  class MyWebViewClient extends WebViewClient {
          @Override
          public boolean shouldOverrideUrlLoading(WebView view, String url) {
              siteAddressBar.setText(url);
              view.loadUrl(url);
              Site = url;
              return true;
          }
          @RequiresApi(api = Build.VERSION_CODES.KITKAT)
          @Override
          public void onPageFinished(WebView view, String url) {
              //view.loadUrl();
              view.evaluateJavascript(&quot;(function() {return document.getElementsByTagName('html')[0].outerHTML;})();&quot;, new ValueCallback&lt;String&gt;() {
                  @Override
                  public void onReceiveValue(final String value) {
                      JsonReader reader = new JsonReader(new StringReader(value));
                      reader.setLenient(true);
                      try {
                          if (reader.peek() == JsonToken.STRING) {
                              String domStr = reader.nextString();
                              if (domStr != null) {
                                  htmlCode = domStr;
                                  Log.e(&quot;Stonmrigal1&quot;,domStr);
                              }
                          }
                      } catch (IOException e) {
                          // handle exception
                      } finally {
                          //IoUtil.close(reader);
                      }
                  }
              });
          }
      }
  </code></pre>
  <p>and Then tried to load html like this:</p>
  <pre><code>webView.loadData(htmlCode,  &quot;text/html; charset=utf-8&quot;, &quot;UTF-8&quot;);
  </code></pre>
  <p>I get response like this:</p>
  <pre><code>    &lt;html class=&quot;js backgroundsize borderimage csstransitions fontface svg details progressbar meter no-mathml cors xxsmallview wb-enable&quot; dir=&quot;ltr&quot; lang=&quot;en&quot; xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
  &lt;head&gt;&lt;/head&gt;
  &lt;body&gt;&lt;/body&gt;
  &lt;/html&gt;
  </code></pre>