-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Getting wrong output form input of any username with a trailing underscore #206
Comments
I am getting wrong username values for my username at twitter. |
Yes indeed @jeremiahtenbrink , the error seems to be originating from the markdownEscape library. Removing the |
Interesting. Is that an option we get with that package. I'm not entirely sure why we are escaping markdown text anyway. It's not we are having to worry about other users injecting code into our readme. We aren't parsing users text and turning it into a readme. So why we are trying to escape the text I don't understand. If anyone has more insight and its something I'm missing. Please let me know. |
I think I understood what's happening... Let's me explain but keep in mind that English isn't my first language so bear with me. My Twitter username is _Edo_ so it must be escaped otherwise in markdown is showed as Edo (without the underscore and in italic). The problem arise only using HTML because the URL is still escaped for markdown even if it's not parsed as markdown. |
Description
When inputting usernames (Twitter, Github, Linkedin or Patreon) with a trailing underscore (i.e foo_), a backward slash is inserted before the trailing underscore leading to errors loading the badge correctly and having to manually fix it.
To Reproduce
Steps to reproduce the behavior:
Input:
Output
npx readme-md-generator
foo_
ScreenShot
Desktop:
The text was updated successfully, but these errors were encountered: