How do I Unescape a String returned from Javascript on Android?
<p>I'm trying to pull some webpage source code from a WebView in an Android app. I've managed, using this: <a href="http://lexandera.com/2009/01/extracting-html-from-a-webview/" rel="noreferrer">http://lexandera.com/2009/01/extracting-html-from-a-webview/</a></p>

<p>plus this to make it work after KitKat:</p>

<pre><code> if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.KITKAT) {
        webView.evaluateJavascript(
                "(function() { return ('&lt;html&gt;'+document.getElementsByTagName('html')[0].innerHTML+'&lt;/html&gt;'); })();",
                new ValueCallback&lt;String&gt;() {
                    @Override
                    public void onReceiveValue(String html) {
                        outputViewer.setText(html);
                    }
                });
    }else{
        webView.loadUrl("javascript:window.HTMLOUT.showHTML" +
                "('&lt;html&gt;'+document.getElementsByTagName('html')[0].innerHTML+'&lt;/html&gt;');");
    }
</code></pre>

<p>Now, the problem is that the non-kitkat version returns exactly what I want. The KitKat version however returns an escaped version of the code, something like this:</p>

<pre><code>"\u003Chtml&gt;\u003Chead&gt;\n\t\u003Cmeta charset=\"UTF-8\"&gt;\n\t\u003Cmeta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"&gt;\n\t\u003Clink rel=\"profile\" href=\"http://gmpg.org/xfn/11\"&gt;\n\t\u003Clink rel=\"pingback\" 
</code></pre>

<p>Is there a straight forward way to unescape that string on Android?</p>

<p>Mike</p>