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

about WebView, when set 'baseUrl', only show html source string. #9835

Closed
cdmalcl opened this issue Sep 10, 2016 · 5 comments
Closed

about WebView, when set 'baseUrl', only show html source string. #9835

cdmalcl opened this issue Sep 10, 2016 · 5 comments
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@cdmalcl
Copy link

cdmalcl commented Sep 10, 2016

Whether it is the issue of bug:
http://stackoverflow.com/questions/39396716/react-native-webviewwhen-add-baserrl-then-just-show-html-string

when set 'baseUrl', only show html source string.
but this control is works:
https://github.com/lucasferreira/react-native-webview-android

@leeight
Copy link
Contributor

leeight commented Sep 12, 2016

Can not reproduce it on the master branch with following code:

  {
    title: 'Static HTML',
    render(): ReactElement<any> {
      return (
        <WebView
          style={{
            backgroundColor: BGWASH,
            height: 200,
          }}
          source={{html: HTML, baseUrl: 'file:///android_asset/'}}
          scalesPageToFit={true}
        />
      );
    }
  }

image

@charpeni
Copy link
Contributor

@facebook-github-bot label Icebox

@charpeni
Copy link
Contributor

Hi there! This issue is being closed because it has been inactive for a while.

But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/about-webview-when-set-baseurl-only-show-html-source-string

ProductPains helps the community prioritize the most important issues thanks to its voting feature.
It is easy to use - just login with GitHub.

Also, if this issue is a bug, please consider sending a PR with a fix.
We're a small team and rely on the community for bug fixes of issues that don't affect fb apps.

@charpeni
Copy link
Contributor

@facebook-github-bot close

@facebook-github-bot
Copy link
Contributor

@charpeni tells me to close this issue. If you think it should still be opened let us know why.

@facebook-github-bot facebook-github-bot added Ran Commands One of our bots successfully processed a command. Icebox labels Nov 14, 2016
facebook-github-bot pushed a commit that referenced this issue Oct 4, 2017
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
@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants