Skip to content

Commit

Permalink
Sanitize metadata links on all platforms
Browse files Browse the repository at this point in the history
As pointed out in #5729, we should be using the "source" of the metadata
for deciding how to sanitize, not the "place where Dependabot is hosted".

This hack was annoying the folks who use GitLab to the point that [they monkey-patched this code to also run the sanitizer on GitLab](#3437 (comment)), and then contributed that back in #3437.

If it's true on GitLab, it's even more true on other platforms as well for the reasons explained in #3437 (comment).

So remove this guard altogether.
  • Loading branch information
jeffwidman committed Sep 21, 2022
1 parent f4f72c7 commit 9fd1c8d
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,6 @@ def source_provider_supports_html?
end

def sanitize_links_and_mentions(text, unsafe: false)
return text unless source.provider == "github" || source.provider == "gitlab"

LinkAndMentionSanitizer.
new(github_redirection_service: github_redirection_service).
sanitize_links_and_mentions(text: text, unsafe: unsafe)
Expand Down

0 comments on commit 9fd1c8d

Please sign in to comment.