← Prev in month
← Prev in thread
Next in thread →
Next in month →
[PATCH] admin: escape html special characters
Ballot system needs the five HTML special characters to be escaped: "'&<> . We don't usually have these but sometimes we do. Support that. Signed-off-by: Michael S. Tsirkin <> --- virtio-ballot.pl
6 ++++++ 1 file changed, 6 insertions(+) diff --git a/virtio-ballot.pl b/virtio-ballot.pl index e78bb44..b35e9f4 100755 --- a/virtio-ballot.pl +++ b/virtio-ballot.pl @@ -22,6 +22,12 @@ my $DESCRIPTION=$ARGV[2]; $DESCRIPTION =~ s/^s*//; $DESCRIPTION =~ s/s*$//;
+$DESCRIPTION =~ s/&/&/sg; +$DESCRIPTION =~ s/</</sg; +$DESCRIPTION =~ s/>/>/sg; +$DESCRIPTION =~ s/"/"/sg; +$DESCRIPTION =~ s/'/'/sg; + { package RC; for my $file ("$ENV{HOME}/.virtio-tc-rc")
--
MST
← Prev in month
← Prev in thread
Next in thread →
Next in month →