-
Notifications
You must be signed in to change notification settings - Fork 127
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
WebView with inline HTML #5
Comments
@rodrigobdz - This change was made for security reasons. I understand that this is a breaking change, but by enforcing this, we wanted to ensure that WebViews are secure by default. Also, I am not sure if this issue belongs in this repo as opposed to the React Native core repo, where we discuss issues. Not sure if others feel the same. |
Uhm I guess that since it's something that will not be reversed, and that @axe-fb provided an explanation for why it was changed, then yeah I think that we can close this and @rodrigobdz if you want to submit a PR to the docs clarifying how this affects WebView feel free to mention me in the PR so that I can review & merge asap. |
@rodrigobdz - I am also sorry we had to make this breaking change. This was filed as a security issue for all existing RN apps :( |
Thanks for the clarification @axe-fb. I will submit a PR this week to complement the docs with a minimal example on how to use inline HTML in WebView. |
WebView not working any more as expected when used with inline HTML.
Goal
Discuss the breaking change before sending a PR to improve the current docs. It seems counterintuitive to add an
originWhitelist
wildcard in order to render inline HTML.Background
This issue was migrated from facebook/react-native/issues/20464.
The regression was introduced in commit
634e7e1
by @mmmulani with commit message:This is not well documented in CHANGELOG which leads to unexpected breaking behavior. It is also not described as an iOS specific change.
What was the rationale behind the breaking change?
Expected Behavior
Use inline HTML in WebView by passing only the HTML code to render.
Actual Behavior
WebView expects
originWhitelist
along withsource
to render inline HTML as suggested in in #19986's comment.The text was updated successfully, but these errors were encountered: