Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ampersand inside code ticks gets escaped as & #334

Open
sscovil opened this issue Jul 2, 2014 · 2 comments
Open

Ampersand inside code ticks gets escaped as & #334

sscovil opened this issue Jul 2, 2014 · 2 comments

Comments

@sscovil
Copy link

sscovil commented Jul 2, 2014

In EpicEditor, when adding a code block like this:

foo&bar

...the result looks like this:

foo&bar

I'm pretty sure GitHub also uses Marked.js as a parser, so I'm guessing this is happening in the export() method?

Animated GIF screenshot

@sscovil
Copy link
Author

sscovil commented Jul 2, 2014

SOLUTION: In epiceditor.js, change line 197 from this:

return content.replace(/\u00a0/g, ' ').replace(/ /g, ' ');

...to this:

return content.replace(/\u00a0/g, ' ').replace(/ /g, ' ').replace(/\u0026/g, '&').replace(/&/g, '&');

I will put in a pull request shortly.

sscovil pushed a commit to sscovil/EpicEditor that referenced this issue Jul 2, 2014
@mistergraphx
Copy link

👍 It Rocks !

thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants