Permalink
Browse files

Fix Android 4.1-4.3 WebView source baseUrl bug

Summary:
Resolves #11753 and #9835.

Android versions 4.1-4.3 don't understand the MIME type `text/html; charset=utf-8` and default to `text/plain` instead, rendering the content as an unparsed HTML string. Since the encoding is already set and passed separately, removing it from the MIME type has no negative effects.

The same fix has already been discussed, successfully tested and incorporated in NativeScript/NativeScript#1038.
Closes #13789

Differential Revision: D5971910

Pulled By: shergin

fbshipit-source-id: 07795bdf0f13ddb1e8eec779d1cad59244f3687e
  • Loading branch information...
Etheryte authored and facebook-github-bot committed Oct 4, 2017
1 parent 26f6f60 commit 59d9f8ca5eb96b4b455b60ed170dfb05bc9c7251
@@ -89,7 +89,7 @@
protected static final String REACT_CLASS = "RCTWebView";
protected static final String HTML_ENCODING = "UTF-8";
protected static final String HTML_MIME_TYPE = "text/html; charset=utf-8";
protected static final String HTML_MIME_TYPE = "text/html";
protected static final String BRIDGE_NAME = "__REACT_WEB_VIEW_BRIDGE";
protected static final String HTTP_METHOD_POST = "POST";

0 comments on commit 59d9f8c

Please sign in to comment.