-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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 #13789
Conversation
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.
Can someone review this PR so we can see it merged in the near future ? We had to make the exact same change on react-native, this is a quite critical bug for us. |
@mkonicek how to help you get it merged? |
will this fix merge to master? |
the scope of the property HTML_MIME_TYPE has recently changed from "private" to "protected". See commit e2c87b5. You should probably fix your pull request. |
@Etheryte I tried to find reviewers for this pull request and wanted to ping them to take another look. However, based on the blame information for the files in this pull request I couldn't find any reviewers. This sometimes happens when the files in the pull request are new or don't exist on master anymore. Is this pull request still relevant? If yes could you please rebase? In case you know who has context on this code feel free to mention them in a comment (one person is fine). Thanks for reading and hope you will continue contributing to the project. |
@facebook-github-bot This pull request is still relevant, I've merged master into the branch. I don't know who to highlight with this request. |
@facebook-github-bot label Needs more information Generated by 🚫 dangerJS |
@Etheryte I tried to find reviewers for this pull request and wanted to ping them to take another look. However, based on the blame information for the files in this pull request I couldn't find any reviewers. This sometimes happens when the files in the pull request are new or don't exist on master anymore. Is this pull request still relevant? If yes could you please rebase? In case you know who has context on this code feel free to mention them in a comment (one person is fine). Thanks for reading and hope you will continue contributing to the project. |
cc @shergin |
I can merge this on Monday. |
+1 to merge this PR. ATM, we've to override the setSource() methods in order to be able to display HTML on Android 4.2.2 :( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shergin is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Motivation
Resolves #11753 and #9835.
Description
Android versions 4.1-4.3 don't understand the MIME type
text/html; charset=utf-8
and default totext/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.