From d32e17df91a19a701f05a90723146b0869b9d8b3 Mon Sep 17 00:00:00 2001 From: Thomas Keller Date: Tue, 3 Jan 2012 13:09:44 +0100 Subject: [PATCH] Actually validate project labels. --- src/IDF/Form/Admin/LabelConf.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/IDF/Form/Admin/LabelConf.php b/src/IDF/Form/Admin/LabelConf.php index 7c886e0..3230ed7 100644 --- a/src/IDF/Form/Admin/LabelConf.php +++ b/src/IDF/Form/Admin/LabelConf.php @@ -44,4 +44,19 @@ License:GPL = Applications with GPL license 'widget' => 'Pluf_Form_Widget_TextareaInput', )); } + + public function clean_project_labels() + { + $labels = preg_split("/\s*\n\s*/", $this->cleaned_data['project_labels'], -1, PREG_SPLIT_NO_EMPTY); + for ($i=0; $i