Skip to content

Fix crashes with <iframe> tag#318

Merged
bd-arc merged 2 commits into
meliorence:masterfrom
Ryabchikus:master
Dec 29, 2019
Merged

Fix crashes with <iframe> tag#318
bd-arc merged 2 commits into
meliorence:masterfrom
Ryabchikus:master

Conversation

@Ryabchikus

@Ryabchikus Ryabchikus commented Nov 21, 2019

Copy link
Copy Markdown
Contributor

If you have <iframe> tag in your html content htmlparser2 v3.10.1 tries to use Webview from 'react-native' for render it and crash
Minimum example of the content on which the error occurs
const content = "<iframe width="640" height="360" src="https://www.youtube.com/embed/iwKAE3rLGoQ?&wmode=opaque" frameborder="0" allowfullscreen="" class="fr-draggable"></iframe>"

This PR fix crashes.

  • update 'htmlparser2' dependency to v4.0.0
  • small changes for correct work with new htmlparser2 version
  • move 'react-native-webview' dependency to 'peerDependencies' section, because 'react-native-webview' must be linked before using
  • add note about 'react-native-webview' dependency to readme.md file

@bd-arc bd-arc merged commit 405918d into meliorence:master Dec 29, 2019
@bd-arc

bd-arc commented Dec 29, 2019

Copy link
Copy Markdown
Collaborator

Thanks for the PR! Available in version 4.2.0.

@pragneshpj

pragneshpj commented Jul 28, 2020

Copy link
Copy Markdown

iFrame keep crashing in android.
react-native-render-html : 4.2.2

@jsamr

jsamr commented Jul 28, 2020

Copy link
Copy Markdown
Collaborator

@pragneshpj Please open a bug report, offer a reproduction, and I'll be happy to investigate and fix this.

@jsamr

jsamr commented Jul 28, 2020

Copy link
Copy Markdown
Collaborator

@pragneshpj Actually it might have been fixed in the latest pre-release. See #390 to see how to install it.

@pragneshpj

Copy link
Copy Markdown

@jsamr thank you for responding.
but this beta version also crashing iFrame post.

@jsamr

jsamr commented Jul 28, 2020

Copy link
Copy Markdown
Collaborator

@pragneshpj OK, we can figure this out on discord!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants