diff --git a/Notification/Discord.php b/Notification/Discord.php index 348669f..6b3763f 100644 --- a/Notification/Discord.php +++ b/Notification/Discord.php @@ -15,6 +15,16 @@ use Kanboard\Model\TaskFileModel; * @package notification * @author Ryonez Coruscare */ + + +// Helper functions + +function clean($string) +{ + $string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens. + return preg_replace('/[^A-Za-z0-9\-.]/', '', $string); // Removes special chars. +} + class Discord extends Base implements NotificationInterface { /**