From 6575b04f25796a3f98a0a377eeffad1dfeee2392 Mon Sep 17 00:00:00 2001 From: thepurpleblob Date: Fri, 1 Dec 2006 16:06:06 +0000 Subject: [PATCH] Improved regep for category switching --- question/format/gift/format.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/question/format/gift/format.php b/question/format/gift/format.php index c48b6d4bb9..6d23a28dd7 100755 --- a/question/format/gift/format.php +++ b/question/format/gift/format.php @@ -143,7 +143,7 @@ class qformat_gift extends qformat_default { $text = $this->escapedchar_pre($text); // Look for category modifier - if (ereg( '^\$CATEGORY:(.+)', $text, $matches)) { + if (ereg( '^\$CATEGORY: *([A-Za-z0-9/]+)[[:space:]]', $text, $matches)) { $newcategory = $matches[1]; // build fake question to contain category -- 2.39.5