diff --git a/include/class.forms.php b/include/class.forms.php
index 5f03015035251e092b3f261eaeb04b1fd848de06..2ef313db867c739ca67389a8d0e0e97f635b9b87 100644
--- a/include/class.forms.php
+++ b/include/class.forms.php
@@ -676,7 +676,7 @@ class TextboxField extends FormField {
                     $wrapped = "/".$value."/iu";
                     if (false === @preg_match($value, ' ')
                             && false !== @preg_match($wrapped, ' ')) {
-                        return $wrapped;
+                        $value = $wrapped;
                     }
                     if ($value == '//iu')
                         return '';