# as if this had been a normal query from the beginning.
}
+# Reject empty searches from the simple search form, including
+# words being a single or several consecutive whitespaces only.
+if (defined($cgi->param('content')) && $cgi->param('content') =~ /^\s*$/) {
+ ThrowUserError("buglist_parameters_required");
+}
+
################################################################################
# Data and Security Validation
################################################################################
<tr>
<td></td>
<td>
- <input type="submit" id="search" value="Search">
- </td>
+ <input type="submit" id="search" value="Search"
+ onclick="if (this.form.content.value == '')
+ {alert('The Words field cannot be empty. You have to ' +
+ 'enter at least one word in your search criteria.');
+ return false;} return true;">
+ </td>
</tr>
</table>
</form>