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

[BUG] [p]tags list doesn't escape markdown, and should probably be paginated #281

Open
tigattack opened this issue Sep 28, 2024 · 0 comments
Labels
bug Something isn't working cog-tags Issues related to the tags cog.

Comments

@tigattack
Copy link
Member

Describe the bug

The message returned by [p]tags list isn't sanitised to escape markdown syntax. This results in broken output with anything as simple as _ in tag names.

To Reproduce
Steps to reproduce the behavior:

  1. Add a tag with a name including markdown control characters, e.g. my_test_tag_
  2. Run [p]tags list
  3. See broken output

Expected behavior

Markdown should be escaped. This is trivial with redbot.core.utils.chat_formatting.escape.

As a stretch, it would be nice if the output were paginated. This is also trivial with redbot.core.utils.chat_formatting.pagify or redbot.core.utils.menus. An example of the former can be found in penis.py, and the latter in notes.py.

Pagination would be nice as lots of tags results in a very long output, which could also run into message length limits. Worth noting that I haven't checked the code to see if this is correctly handled, but given the lack of pagination I'd guess it isn't or could at least be improved.

Screenshots

See italicised text near the end:
image

Additional context

@tigattack tigattack added bug Something isn't working cog-tags Issues related to the tags cog. labels Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cog-tags Issues related to the tags cog.
Projects
None yet
Development

No branches or pull requests

1 participant