-
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
[Android4.1-4.3][v0.39]WebView source={{html}} show all html string without parse html if 'baseUrl' is set #11753
Comments
And, Android4.3 webview |
I can confirm this happens on RN 0.39 on my Galaxy S3 with Android 4.3. |
same issue |
Same thing happened in the NativeScript project, looks like the solution is quite simple |
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 should have no negative effects.
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.
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.
Closing this issue because it has been inactive for a while. If you think it should still be opened let us know why. |
@hramos could you reopen it, cause it is still not fixed? |
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.
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
Description
use source={{baseUrl: 'xx', html:
<h1>Hi</h1><script>alert(1);</script>
}}Android4.3 looks like treat webview as , will output all html string in View,
use html=
xxx
or source={{html:xxx
}} worksReproduction
very simple code will reproduce:
Solution
Additional Information
The text was updated successfully, but these errors were encountered: