meliorence / react-native-render-html

iOS/Android pure javascript react-native component that renders your HTML into 100% native views
https://meliorence.github.io/react-native-render-html/
BSD 2-Clause "Simplified" License
3.48k stars 589 forks source link

<font> tag is not rendered #531

Closed abramovks closed 2 years ago

abramovks commented 3 years ago

Decision Table

Good Faith Declaration

Description

Hello. tag is not rendered This tag was added by React Jodit editor in the administrative panel. And text didn't render in react-native.

Solved by replacing String.replaceAll('<font', '<span').replaceAll('</font', '</span')

React Native Information

"react-native": "0.65.1"

RNRH Version

"react-native-render-html": "^6.2.0"

Tested Platforms

  • [ ] Android
  • [X] iOS
  • [ ] Web
  • [ ] MacOS
  • [ ] Windows

Reproduction Platforms

  • [ ] Android
  • [X] iOS
  • [ ] Web
  • [ ] MacOS
  • [ ] Windows

Minimal, Reproducible Example

<RenderHtml contentWidth={width} source={{ html: "Test" }} />

Additional Notes

No response

jsamr commented 2 years ago

@abramovks Hi @abramovks! I am going to close because this issue is a duplicate of #405.

<font> is an HTML4, deprecated tag. See #405 for a detailed explanation and a solution.