Comments (7)
I just had a similar problem with this code inside the HTML:
</p>\n<blockquote class=\"instagram-media\" data-instgrm-captioned data-instgrm-permalink=\"https://www.instagram.com/p/BcECNjNlCJc/\" data-instgrm-version=\"8\" style=\" background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:658px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);\">\n<div style=\"padding:8px;\">\n<div style=\" background:#F8F8F8; line-height:0; margin-top:40px; padding:50% 0; text-align:center; width:100%;\">\n<div style=\" background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAMUExURczMzPf399fX1+bm5mzY9AMAAADiSURBVDjLvZXbEsMgCES5/P8/t9FuRVCRmU73JWlzosgSIIZURCjo/ad+EQJJB4Hv8BFt+IDpQoCx1wjOSBFhh2XssxEIYn3ulI/6MNReE07UIWJEv8UEOWDS88LY97kqyTliJKKtuYBbruAyVh5wOHiXmpi5we58Ek028czwyuQdLKPG1Bkb4NnM+VeAnfHqn1k4+GPT6uGQcvu2h2OVuIf/gWUFyy8OWEpdyZSa3aVCqpVoVvzZZ2VTnn2wU8qzVjDDetO90GSy9mVLqtgYSy231MxrY6I2gGqjrTY0L8fxCxfCBbhWrsYYAAAAAElFTkSuQmCC); display:block; height:44px; margin:0 auto -44px; position:relative; top:-22px; width:44px;\"></div>\n</div>\n<p style=\" margin:8px 0 0 0; padding:0 4px;\"> <a href=\"https://www.instagram.com/p/BcECNjNlCJc/\" style=\" color:#000; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none; word-wrap:break-word;\" target=\"_blank\">#avengersinfinitywar #infinitywar #infinitystones #ironspider #ironman #spiderman #spidermanhomecoming #captainamericacivilwar #vingadores #guerrainfinita #peterparker #tonystark #tomholland #robertdowneyjr #marvelcomics #marvel</a></p>\n<p style=\" color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; line-height:17px; margin-bottom:0; margin-top:8px; overflow:hidden; padding:8px 0 7px; text-align:center; text-overflow:ellipsis; white-space:nowrap;\">Ein Beitrag geteilt von <a href=\"https://www.instagram.com/superhero_world1996/\" style=\" color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px;\" target=\"_blank\"> Gabriel Rock</a> (@superhero_world1996) am <time style=\" font-family:Arial,sans-serif; font-size:14px; line-height:17px;\" datetime=\"2017-11-29T02:51:34+00:00\">Nov 28, 2017 um 6:51 PST</time></p>\n</div>\n</blockquote>\n<p><script async defer src=\"//platform.instagram.com/en_US/embeds.js\"></script></p>\n<p>
To make it work I had to additionally add padding to the ignored styles:
ignoredStyles={['display', 'width', 'height', 'font-family', 'padding']}
from react-native-render-html.
I can render your HTML if I ignore the following styles :
display
, because ofblock
width
andheight
because ofcalc()
not being supported at allfont-family
because I'm missing those fonts
from react-native-render-html.
Hi,
It's working fine for me with 3.5.2
🤔
<div style="display:block"><p>crash ?</p></div>
crashes as expected, but with ignoredStyles={['display']}
it doesn't.
Can I see your full HTML content and props ? I guess you must have another faulty style somewhere.
from react-native-render-html.
Oh, and by the way, if your display
style is in an <a>
tag, it has been fixed here #60.
I'm just waiting until I finish some new features and fixes to merge it with the next version of the plugin.
from react-native-render-html.
@Exilz it is inside a div, it is a instagram embed post. Can it be because of nested divs?
check it: https://pastebin.com/mtqvQ5kS
from react-native-render-html.
@Exilz cool so the problem was width, height & font-family after display, strange why debugger didn't show any errors, maybe because app crashed before logging errors. Thanks anyway, great work 🙌
from react-native-render-html.
have anyone tried to replace it with new props for style?
from react-native-render-html.
Related Issues (20)
- Adjust the height container when inject a custom component in renders (image)
- other fonts don't work for children tags if you set font for parent HOT 1
- Failed prop type: Invalid prop `textDecorationColor` supplied to `Text`
- Render Error, maximum call stack size exceeded (native stack depth) HOT 2
- `<img>` embeds possibly not making use of `srcset` attribute resulting in blurry images HOT 3
- It is slow, it takes to import the components around 2 seconds
- Need Help for Break Lines Implementation HOT 1
- webView props mediaPlaybackRequiresUserAction not work HOT 2
- Not working android Realme device HOT 1
- defaultTextProps style overwrites renderers HOT 1
- Email or text is not showing proper way
- Slow navigate to a screen contains 12k words (including table) HOT 1
- RTL is not working on p or div tag HOT 1
- the app crashes while rendering the table on Android. `table-plugin`
- How to disable Font Scaling in react-native-render-html v6 HOT 1
- Font family not working HOT 2
- React Native 0.74 (Bridgeless) Support HOT 1
- Bullet didn't move with text when add padding to list item
- React 0.74 - Update defaultProps to JavaScript default parameters. HOT 43
- Can not render superscript <sup> tag HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-render-html.