Fix for text not rendering after # in markdown #1033

Merged
kekkyojin merged 1 commit from md-text-rendering into master 2020-10-23 14:23:16 +02:00
kekkyojin commented 2020-10-15 02:05:52 +02:00 (Migrated from github.com)

PR Checklist

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

  • I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
  • I have checked that this PR does not introduce a breaking change
  • This PR introduces breaking changes and I have provided a detailed explanation below

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting)
  • Refactoring (no functional changes)
  • Documentation changes
  • Other - Please describe:

Fixes

Issue Number: #960 (partial fix, do not close it)

What is the current behavior?

Due to some change introduced in Chrome, WebViews are unable to render anything after the first '#'. If that happens at the beginning of the markdown document, the HTML render will not be displayed, although the HTML code itself is correct.

Strings like '#1', '#hashtag' will make the problem appear.

What is the new behavior?

This fix changes the '#' into '%23' on the HTML generated code from markdown.

Other information

The issue indicated above was about two distincts problems. This one fixes the one from the German blog post. That file was modified, so it is no longer showing the problem. However, it was identified as being related to '#'.

The other one was about lbrycast style of claims, where video was embedded into the markdown using an IFRAME. I will also try to fix that in some future PR.

## PR Checklist <!-- For the checkbox formatting to work properly, make sure there are no spaces on either side of the "x" --> Please check all that apply to this PR using "x": - [x] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged) - [x] I have checked that this PR does not introduce a breaking change - [ ] This PR introduces breaking changes and I have provided a detailed explanation below ## PR Type What kind of change does this PR introduce? - [x] Bugfix - [ ] Feature - [ ] Code style update (formatting) - [ ] Refactoring (no functional changes) - [ ] Documentation changes - [ ] Other - Please describe: ## Fixes Issue Number: #960 (partial fix, do not close it) ## What is the current behavior? Due to some change introduced in Chrome, WebViews are unable to render anything after the first '#'. If that happens at the beginning of the markdown document, the HTML render will not be displayed, although the HTML code itself is correct. Strings like '#1', '#hashtag' will make the problem appear. ## What is the new behavior? This fix changes the '#' into '%23' on the HTML generated code from markdown. ## Other information The issue indicated above was about two distincts problems. This one fixes the one from the German blog post. That file was modified, so it is no longer showing the problem. However, it was identified as being related to '#'. The other one was about lbrycast style of claims, where video was embedded into the markdown using an IFRAME. I will also try to fix that in some future PR. <!-- If this PR contains a breaking change, please describe the impact and solution strategy for existing applications below. -->
kekkyojin commented 2020-10-15 02:21:13 +02:00 (Migrated from github.com)

HTML generated code is correct, so in order to test it, visiting some test claims would be required. I suggest visitng following claim before and after applying the PR:

Claim to test hashtag style text

HTML generated code is correct, so in order to test it, visiting some test claims would be required. I suggest visitng following claim before and after applying the PR: [Claim to test hashtag style text](https://lbry.tv/Hashtag-test:b)
kauffj commented 2020-10-22 18:03:40 +02:00 (Migrated from github.com)

@akinwale please review/merge this

@akinwale please review/merge this
akinwale (Migrated from github.com) approved these changes 2020-10-23 14:23:08 +02:00
akinwale (Migrated from github.com) left a comment

Looks good! Thanks.

Looks good! Thanks.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-android#1033
No description provided.