Commit f36b1e8b authored by Leigh Stoller's avatar Leigh Stoller

Minor fix to previous revision.

parent 6cb0ab6f
......@@ -51,6 +51,13 @@ function SPITSEARCHFORM($query)
</table><br>\n";
}
if (!isset($query) || $query == "") {
PAGEHEADER("Search Emulab Documentation");
SPITSEARCHFORM("");
PAGEFOOTER();
return;
}
if ($TBMAINSITE || $REMOTEWIKIDOCS) {
$query = htmlspecialchars($query);
header("Location: $WIKIDOCURL/../search?q=$query&noquickjump=1&wiki=on");
......@@ -62,12 +69,6 @@ if ($TBMAINSITE || $REMOTEWIKIDOCS) {
#
PAGEHEADER("Search Emulab Documentation");
if (!isset($query) || $query == "") {
SPITSEARCHFORM("");
PAGEFOOTER();
return;
}
# Sanitize for the shell. Be fancy later.
if (!preg_match("/^[-\w\ \"]+$/", $query)) {
SPITSEARCHFORM("");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment