lbryio / lbry-android

The LBRY Android app
MIT License
2.44k stars 113 forks source link

Use Base64 to encode html when rendering Markdown files #1102

Closed kekkyojin closed 3 years ago

kekkyojin commented 3 years ago

PR Checklist

Please check all that apply to this PR using "x":

PR Type

What kind of change does this PR introduce?

Fixes

Issue Number: #960 -still partially fixed, don't close it-

What is the current behavior?

Some problems are still showing up when using the octothorpe character

What is the new behavior?

New code fixes it by encoding the HTML string using Base64, as recommended by Google. Additionally, it no longer requires to run a regex matching, making it faster.

Testing

Search for "octothorpe-test" on the LBRY Android app and open the one on the "javirid" channel, as it includes some problematic cases. Currently it shows a few problems still. With this PR applied, everything looks fine. Compare it with the rendered Markdown on LBRY.TV