BoostIO/Boostnote

Do you want to work on this issue?

You can request for a bounty in order to promote it!


2 active bounty requests

$30.00$40.00
Solve someone else's bounty request by clicking on it and completing the funding to earn additional credits

`&lt;` will be rendered as `<` #2931

bbbbx posted onGitHub

Current behavior

code block preview will be rendered :

http://wx4.sinaimg.cn/large/c1fe1586gy1g15rpqces1j21vc0cadli.jpg

Expected behavior

code block preview should render as what I typed :

function transform(value) {
  // ...
  return value.toString()
    .replace(/</g, '&lt;')
    // ...
}

Steps to reproduce

  1. type &lt; in editor
  2. then preview will render as <

Environment

  • Version : Version 0.11.13 (0.11.13)
  • OS Version and name : macOS 10.14.3

Looked into this and it seems the fix for it is to escape the HTML entities like this "\ & l t ;" In the code, it should be double backslash escaped but for a test in your markdown do one backslash and test it out.

function transform(value) { // ... return value.toString() .replace(/</g, '\ & l t ;') // ... } I can do a PR for this if nobody jumps first. Note: i've spaced the html entity code because of escaping 😄

posted by alexpeta almost 6 years ago
posted by alexpeta almost 6 years ago

@boostio has funded $30.00 to this issue.


posted by IssueHuntBot almost 6 years ago

Error before:

current_state

Error after: Screen Shot 2020-08-19 at 10 55 55

opening PR in a few minutes

posted by juliankoehn over 4 years ago

Fund this Issue

$30.00
Funded
Only logged in users can fund an issue

Pull requests

Recent activities

juliankoehn submitted an output to  BoostIO/ Boostnote# 2931
over 4 years ago
us-aito submitted an output to  BoostIO/ Boostnote# 2931
over 5 years ago