diff --git a/cgi-bin/webbuild b/cgi-bin/webbuild
index 0929df6..5d74674 100755
--- a/cgi-bin/webbuild
+++ b/cgi-bin/webbuild
@@ -1200,7 +1200,7 @@ fi
if [ "$PACKAGE" ]; then
[ "$AUTODISTJOB" ] || AUTODISTJOB=${PACKAGE/\/*}
- AUTODISTJOB="${AUTODISTJOB/-/_}"
+ AUTODISTJOB="${AUTODISTJOB//[-]/_}"
PACKAGE=${PACKAGE/*\/}
eval `$SUDO_WRAPPER specinfo $ENVIRONMENT "$USER" $PACKAGE ""`
[ $? -eq 0 ] && SPECAVAILABLE=1
@@ -1341,10 +1341,10 @@ if [ "$MAINTAINERMODE" != "true" ]; then
if [ "$AUTODISTJOB" -a "$AUTODISTJOB" = "$f" ]; then
SELECTED="selected=\"selected\""
AUTODISTJOBSELECTED=1
- elif [ "$PACKAGE" = "$f" -a ! "$AUTODISTJOB" ]; then
+ elif [ "${PACKAGE}" = "$f" -a ! "$AUTODISTJOB" ]; then
# elif [ "$PACKAGE" = "$f" -a ! "$AUTODISTJOBSELECTED" -a "$REQUEST" != "autodistjobchange" ]; then
SELECTED="selected=\"selected\""
- AUTODISTJOB=$f
+ AUTODISTJOB=${f//[-]/_}
AUTODISTJOBSELECTED=1
fi
JOBENCODED=`cgi_encodevar $f`
@@ -1356,7 +1356,7 @@ if [ "$MAINTAINERMODE" != "true" ]; then
echo -n ""
fi
echo -n ""
- if [ "$AUTODISTJOBSELECTED" -a "$AUTODISTJOB" = "${PACKAGE/-/_}" ]; then
+ if [ "$AUTODISTJOBSELECTED" -a "$AUTODISTJOB" = "${PACKAGE//[-]/_}" ]; then
echo -n "
You should use autodist for this package!"
fi
if [ "$AUTODISTJOB" ]; then
diff --git a/webbuild-page.php b/webbuild-page.php
index d1db59f..b1db6cb 100644
--- a/webbuild-page.php
+++ b/webbuild-page.php
@@ -1,4 +1,9 @@