sll552/DiscordBee

Add a way to prevent slashes / within virtual tags from getting converted to %2F in the Custom Button

Rings4 opened this issue · 1 comments

I want to provide a different url for the custom button based on how many plays a track has. If it has 0 plays, it should go to my last.fm. Otherwise, it should go to the page where it shows how many scrobbles I have for that track, and when. The latter url requires additional /, but the custom button converts / from the virtual tag to %2F.

I'd like a way to escape this conversion by, for example, surrounding the / in curly brackets, etc. inside the virtual tag itself so that when it's read, it's converted to just the / itself.

Could you test this https://ci.appveyor.com/api/buildjobs/ocbq1c0k7kmqon5a/artifacts/DiscordBee-Release--333.zip

You can use the escape character \ in every placeholder(e.g. virtual tag) that starts with ###, so to get a literal slash:

###some\/text with whitespace -> some/text%20with%20whitespace

Escaping works for all characters not only slash and if you need a literal backslash you need to double it.