Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Commit

Permalink
fix: handle http protocol capitalization when checking links (#814)
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-mba authored Jul 2, 2024
1 parent 772c269 commit f83ff9f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/links/checkLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import type { ExtendedClient } from '../interfaces/ExtendedClient.js';
import { errorHandler } from '../utils/errorHandler.js';

const allowedLinks = ['github.com', 'eddiejaoude.io', 'gitlab.com'];
const urlPattern = /(http|https):\/\/([\w-]+(\.[\w-]+)+)(\/[\w-./?%&=]*)?/g;
const urlPattern =
/[Hh][Tt][Tt][Pp][Ss]?:\/\/([\w-]+(\.[\w-]+)+)(\/[\w-./?%&=]*)?/g;

export const checkLinks = async (
bot: ExtendedClient,
Expand Down

0 comments on commit f83ff9f

Please sign in to comment.