From 1c2ea8058d9e6dc009e735dfa31dac33c53723e7 Mon Sep 17 00:00:00 2001 From: Myles Carrick Date: Thu, 14 Apr 2011 16:32:47 +1000 Subject: [PATCH 07/11] MOODLE-32: include correct regex when testing URLs --- mod_form.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mod_form.php b/mod_form.php index 1aa4b98..cb27608 100644 --- a/mod_form.php +++ b/mod_form.php @@ -155,7 +155,7 @@ class mod_adobeconnect_mod_form extends moodleform_mod { // Check URL for correct length and format if (strlen($data['meeturl']) > 60) { $errors['meeturl'] = get_string('longurl', 'adobeconnect'); - } elseif (!preg_match('/^[a-z][^a-z0-9]/i', $data['meeturl'])) { + } elseif (!preg_match('/^[a-z][a-z\-]*/i', $data['meeturl'])) { $errors['meeturl'] = get_string('invalidurl', 'adobeconnect'); } -- 1.7.2.2