diff --git a/common/classes/Model.php b/common/classes/Model.php index fc2f11b..cd1d2eb 100644 --- a/common/classes/Model.php +++ b/common/classes/Model.php @@ -46,7 +46,9 @@ class Model { $text = str_replace($search, $replace, $text); // Verwijder alle woorden van 3 letters, behalve BEL (BEL-combinatie etc) - $text = preg_replace('/\b(?!bel|fm|nh)([a-z]{1,3})\b/u', '', $text); + if(strlen($text) > 3) { + $text = preg_replace('/\b(?!bel|fm|nh)([a-z]{1,3})\b/u', '', $text); + } // Vervang alles dat niet een woord-karakter is (letter, cijfer), een streepje of spatie $text = preg_replace('/[^\w_\-\s]/', '', $text); diff --git a/common/classes/Podcast.php b/common/classes/Podcast.php index 61ee2b1..b923cec 100644 --- a/common/classes/Podcast.php +++ b/common/classes/Podcast.php @@ -23,7 +23,7 @@ class Podcast extends Model { parent::__construct($data); parent::ConvertToDateTime($this->created); - $this->url = '/' . $this->id . '/' . parent::url_slug($this->title); + $this->url = '/' . $this->id . '/' . parent::url_slug($this->title) . '.mp3'; if($this->soundfilename) { // Only generate when not constructing from a JSON object $this->key = sha1($this->id . ':' . date('Y-m-d') . ':' . $this->soundfilename);