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

Dash Escaping is not working anymore in statics #9679

Closed
Eforen opened this issue Oct 23, 2023 · 3 comments
Closed

Dash Escaping is not working anymore in statics #9679

Eforen opened this issue Oct 23, 2023 · 3 comments
Labels
question Support questions, usage questions, unconfirmed bugs, discussions, ideas

Comments

@Eforen
Copy link

Eforen commented Oct 23, 2023

Are you experiencing an issue with...

shields.io

🐞 Description

https://img.shields.io/badge/test--test2?label=wtf

Should be producing [ wtf | test-test2 ]
But is [ wtf | ]

Current Example

Static Badge

🔗 Link to the badge

https://img.shields.io/badge/test--test2?label=wtf

💡 Possible Solution

seems that double-dash is exploading the backend somehow

@Eforen Eforen added the question Support questions, usage questions, unconfirmed bugs, discussions, ideas label Oct 23, 2023
@github-actions
Copy link
Contributor

Badge tested using npm run badge https://img.shields.io/badge/test--test2?label=wtf
Output is available here

@chris48s
Copy link
Member

chris48s commented Oct 23, 2023

If you want a badge that says [ wtf | test-test2 ] using dash escaping, then you should do something like

https://img.shields.io/badge/wtf-test--test2-blue (or whatever colour you want in place of blue)

https://img.shields.io/badge/test--test2 is rendering a badge with:

  • the label test
  • no message
  • the colour test2 (which doesn't exist, so its falling back to the default)

..and then you're also overriding the label with wtf as a URL param.

@Eforen
Copy link
Author

Eforen commented Oct 23, 2023

That fixed my issue hope it also helps someone else

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Support questions, usage questions, unconfirmed bugs, discussions, ideas
Projects
None yet
Development

No branches or pull requests

2 participants