Yes. It appears when this commit is merged. On RN 0.50.0 above, Android 4.x WebView cannot display text/html format.
Yes
Environment:
OS: macOS High Sierra 10.13.2
Node: 8.9.1
Yarn: Not Found
npm: 5.5.1
Watchman: Not Found
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: 0.50.0 => 0.50.0
Target Platform: Android 4.1.2 (API 16)
Render this component:
`export default class TestWebView extends Component<{}> {
render() {
const html = "<html>\n <body>" +
"※Facebook,並びにGoogle+へ許可なく投稿がされることはありません。" +
"</body>\n</html>";
return (
<WebView
style={{flex:1}}
source={{html}}/>
);
}
}`


(Paste the link to an example project and exact instructions to reproduce the issue.)
I have the same issue :(
same issue
@adrianomelo thanks but how can i upgrade react-native that refer to specific commit or tag when it is not release on NPM?
@adrianomelo same question with @derakhshanfar. Should we create a PR to react-native repo? BTW, I will clone your repo to check again.
@derakhshanfar, I can see two options if you need the fix for this problem asap. The first choice is using an older React Native version while the fix is not published. I guess that 0.49 is working fine. The second option is using a fork of React Native with my commit. You can use my branch if you don't want to fork RN. In this case, you can follow this tutorial on how to use RN built from the source replacing:
npm install --save github:facebook/react-native#master
with:
npm install --save github:adrianomelo/react-native#loadurl
I don't recommend the second approach unless you are an experienced developer. This process usually takes a lot of time. Maintaining a fork is not fun. :)
@huynhtansi, I already submitted a pull request with a fix for it. However, if you can test, it would be awesome. You can comment on the PR and it might speed up the process of merging it to upstream.
Same here.
This is really bad. I've almost finished my app before submission to the Google Play and stumbed upon this issue. Is there a workaround for this?
Guys! Here's the solution that worked for me. On Platform.OS === 'android' add baseUrl: '' to source property of the WebView. UTF-8 displays correctly then!
Thanks for posting this! It looks like you may not be using the latest version of React Native, v0.53.0, released on January 2018. Can you make sure this issue can still be reproduced in the latest version?
I am going to close this, but please feel free to open a new issue if you are able to confirm that this is still a problem in v0.53.0 or newer.
Hi @GrigoryPtashko , how to resolve in case I load a string html in source property? btw, it's still a problem in v0.53.0 and newer.
Update: Got it, it should be 'source={{html, 'baseUrl': 'about:blank'}}'
@huynhtansi see my comment above. baseUrl must be ''.
Most helpful comment
Guys! Here's the solution that worked for me. On
Platform.OS === 'android'addbaseUrl: ''tosourceproperty of theWebView. UTF-8 displays correctly then!