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

Fixed MarkdownSanitizer altering URL symbols #2501

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

LaFriska
Copy link

@LaFriska LaFriska commented Jul 16, 2023

Pull Request Etiquette

Changes

  • Internal code
  • Library interface (affecting end-user code)
  • Documentation
  • Other: _____

Closes Issue: #2378

Description

  • Previously, MarkdownSanitizer sanitizes symbols used in URLs, despite Discord ignoring them and not treating them as markdowns.

  • The algorithm implemented searches and replaces all URLs by a placeholder, and replaces them back after the majority of the MarkdownSanitizer#compute method finishes.

  • A dedicated method had also been added to the MarkdownTest class to efficiently test this algorithm.

-Suggested by EclipsedSolari in issue discord-jda#2378
-The algorithm implemented searches and replaces all URLs by a placeholder, and replaces them back after the majority of the compute method finishes.
-Also added a test method in the MarkdownTest class.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant