ok question handling was completely broken.
in particular we no longer can have multiline questions
it seems? :( oh well not such a big deal.
Signed-off-by: Michael S. Tsirkin <
mst@redhat.com>
---
virtio-ballot.pl | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/virtio-ballot.pl b/virtio-ballot.pl
index f877353..65de56e 100755
--- a/virtio-ballot.pl
+++ b/virtio-ballot.pl
@@ -150,15 +150,11 @@ sub escape_for_html {
#some fields are different. Donnu why /shrugs
sub escape_for_title {
my $s=shift;
+ $s =~ s/\n/ /g;
$s =~ s/'/"/sg;
$s =~ s/\\/\\\\/sg;
return $s;
}
-sub escape_for_question {
- my $s=shift;
- $s =~ s/'/"/sg;
- return $s;
-}
###########################################################################
#create ballot
###########################################################################
@@ -166,11 +162,10 @@ sub escape_for_question {
#load ballot info
my $NAME=$ARGV[0];
#no line breaks in title
-$NAME =~ s/\n/ /g;
$NAME = escape_for_title($NAME);
my $QUESTION=$ARGV[1];
-$QUESTION = escape_for_question($QUESTION);
+$QUESTION = escape_for_title($QUESTION);
my $DESCRIPTION=$ARGV[2];
$DESCRIPTION = escape_for_html($DESCRIPTION);
--
MST</
mst@redhat.com>