Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Android 4.1-4.3 WebView source baseUrl bug #1

Closed
wants to merge 1 commit into from

Conversation

vikkalen
Copy link
Owner

Resolves facebook#11753. 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 fix follows Android Doc on WebView.loadData() and WebView.loadDataWithBaseUrl():

https://developer.android.com/reference/android/webkit/WebView.html

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

Resolves facebook#11753. 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.
@vikkalen vikkalen closed this Jul 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Android4.1-4.3][v0.39]WebView source={{html}} show all html string without parse html if 'baseUrl' is set
1 participant