Encode all non-alphanumeric characters in technology names and logos
Description
This fixes badges like this:
https://img.shields.io/static/v1?label=&message=C#&color=512BD4&logo=dotnet&logoColor=FFFFFF
by replacing the # in the &message query to %23
and now it looks like this:
Encoding all non-alphanumeric characters should be safe for just tech name and logo. From trial and error, I found out that only a small set of symbols (not included in the fragment encoding) cause this issue (including +, #, &, %).
Steps
- [ ] My change requires a change to the documentation
- [ ] I have updated the accessible documentation according
- [x] There is no duplicate open or closed pull request for this fix/addition/issue resolution.
Original Issue
No issue has been opened yet.
Test results
PR:
| 💻 Technology | 🚀 Projects |
|---|---|
Expected:
| 💻 Technology | 🚀 Projects |
|---|---|
Notice the unencoded percent in the last repository. This is probably due to the message being encoded after this manual addition of "%20(WIP)".
This is actually intended behavior, so either that literal should be changed to " (WIP)", or we can simplify the PR to just encode the extra characters that cause the bug, instead of all non-alphanumericals.