BlackGlory / copycat

🌳 Copy content from web powerful than ever before.
https://chrome.google.com/webstore/detail/jdjbiojkklnaeoanimopafmnmhldejbg
MIT License
266 stars 35 forks source link

Percent encode parenthesis in URL when creating Markdown link #9

Closed leesei closed 1 year ago

leesei commented 5 years ago

URL: https://www.wikiwand.com/en/Ring_(mathematics) "Tab link -> Markdown": [Ring (mathematics) - Wikiwand](https://www.wikiwand.com/en/Ring_(mathematics)) which caused problem in some Markdown parser

I recommends outputting this: [Field (mathematics) - Wikiwand](https://www.wikiwand.com/en/Field_%28mathematics%29)

leesei commented 5 years ago

Also encode space as %20

BlackGlory commented 1 year ago

This issue is more complicated than I thought. I found that brackets are explicitly listed as reserved characters in the URL encoding. A Markdown parser should have the ability to distinguish between URLs and Markdown syntax, and if it can't, then it needs to be fixed. This extension should not change the output for this particular case.