question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Not rendering properly

See original GitHub issue

Oath

I swear that I have completed these tasks before submitting:

Decision table

  • My issue does not look like “The HTML attribute ‘xxx’ is ignored” (unless we claim support for it),
  • My issue does not look like “The HTML element <yyy> is not rendered”

Bug Report

HTML is not being rendered properly.

Libraries
  • react-native-render-html: 6.0.0-alpha.11
  • react-native-webview: N/A

Reproduction

https://snack.expo.io/@jsamr/rnrh-453

Description

HTML Should be rendered like this.

screenshot-2021-01-29_21 37 10 703

But instead, it’s like this.

screenshot-2021-01-29_21 43 01 592

Reproducible Demo

https://snack.expo.io/@jsamr/rnrh-453

(Paste the link to an example project or paste the entirety of the relevant source code. When deemed appropriate, provide instructions to reproduce the issue.)

(If you plan to provide a Regression Test PR, just leave a line written Planned Regression Test and link it here when it’s ready. We will be happy to provide you help with crafting the test on our Discord #contributing channel.)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
sayem314commented, Jan 29, 2021

Thank you very much for taking the time to explain. Appreciate the effort you put into this project. ❤️

1reaction
jsamrcommented, Jan 29, 2021

Another issue I have came across when using.

htmlParserOptions={{
  xmlMode: true, // since I'm reading feeds html
  decodeEntities: false, // I do that already with feed parser library
}}

screenshot-2021-01-30_00 05 10 439

[Sat Jan 30 2021 24:05:46.696]  INFO     Transient Render Tree update:
 •TDocument(tag=html)
  └─•TBlock(tag=body)
    ├─•TBlock(tag=h2)
    │ └─•TPhrasing(anonymous)
    │   └─•TText(anonymous,data["rails made rails/tailwin"…])
    ├─•TPhrasing(anonymous)
    │ └─•TText(tag=i,data["Thursday, January 14, 21"…])
    └─•TBlock(tag=div,classes=public)
      └─•TBlock(tag=div,classes=body)
        └─•TBlock(tag=div,classes=d-flex flex-items-baseline border-bottom border-gray py-3)
          ├─•TBlock(tag=span)
          │ └─•TBlock(tag=a,anchor[/rails])
          │   └─•TBlock(tag=img,classes=avatar)
          └─•TBlock(tag=div,classes=d-flex flex-column width-full)
            ├─•TBlock(tag=div)
            │ └─•TBlock(tag=div,classes=d-flex flex-items-baseline)
            │   └─•TBlock(tag=div)
            │     └─•TPhrasing(anonymous)
            │       ├─•TText(tag=a,classes=link-gray-dark no-underline text-bold wb-break-all d-inline-block,data["rails"],anchor[/rails])
            │       ├─•TText(anonymous,data[" made "])
            │       ├─•TText(tag=a,classes=link-gray-dark no-underline text-bold wb-break-all d-inline-block,data["rails/tailwindcss-rails"],anchor[/rails/tailwindcss-rails])
            │       ├─•TText(anonymous,data[" public"])
            │       └─•TPhrasing(tag=span,classes=f6 text-gray-light no-wrap ml-1)
            └─•TBlock(tag=div,classes=Box p-3 my-2)
              └─•TBlock(tag=div)
                ├─•TBlock(tag=div,classes=f4 lh-condensed text-bold text-gray-dark)
                │ └─•TPhrasing(anonymous)
                │   └─•TText(tag=a,classes=link-gray-dark no-underline text-bold wb-break-all d-inline-block,data["rails/tailwindcss-rails"],anchor[/rails/tailwindcss-rails])
                ├─•TBlock(tag=div,classes=dashboard-break-word text-gray mt-1 mb-0 repo-description)
                │ └─•TBlock(tag=p)
                └─•TBlock(tag=p,classes=f6 text-gray mt-2 mb-0)
                  ├─•TPhrasing(anonymous)
                  │ └─•TPhrasing(tag=span,classes=d-inline-block text-gray mr-3)
                  │   └─•TPhrasing(tag=span,classes=ml-0)
                  │     ├─•TText(tag=span,classes=repo-language-color,data[""])
                  │     ├─•TText(anonymous,data[" "])
                  │     └─•TText(tag=span,data["CSS"])
                  ├─•TBlock(tag=span)
                  │ ├─•TBlock(tag=svg,classes=octicon octicon-star mr-1)
                  │ │ └─•TEmpty(tag=path)
                  │ └─•TPhrasing(anonymous)
                  │   └─•TText(anonymous,data["494"])
                  └─•TPhrasing(anonymous)
                    └─•TText(tag=span,data["Updated Jan 27"])

Yes, because it is not a Web engine, we don’t provide default renderers for SVG tags. But one SVG renderer might be implemented at some point in the https://github.com/native-html/plugins project (I can also be hired for a paid job regarding this feature). Also, make sure the react-native-webview library would not be a better fit for your requirements.

Read more comments on GitHub >

github_iconTop Results From Across the Web

BUG: Screen is not rendering properly when directl...
Hello Community, I have an issue in my app about screen rendering. I have 3 screen in my application. What happens here is,...
Read more >
[Bug] Table not rendering properly : r/redditsync
This table is not being rendered properly in the app. It looks fine on the website https://www.reddit.com/r/LoLeventVoDs/comments/vejpru.
Read more >
5 Solutions if After Effects is Not Rendering Properly
5 Solutions if After Effects is Not Rendering Properly · 1. Use the Render Queue Panel · 2. Render Using Media Encoder ·...
Read more >
Islands not rendering properly
Hi I'm a long time fan of the game but just have a problem at the moment. Recently I have been experiencing a...
Read more >
Handles are not rendering correctly - Engine Bugs
Handles are not rendering correctly ; Expected Behavior: The squares should not remain on the screen (atleast in the same place) when moving ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found