OASIS Virtual I/O Device (VIRTIO) TC

 View Only
  • 1.  [PATCH] admin: escape html special characters

    Posted 04-06-2021 11:41
    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 <mst@redhat.com> --- 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/&/&amp;/sg; +$DESCRIPTION =~ s/</&lt;/sg; +$DESCRIPTION =~ s/>/&gt;/sg; +$DESCRIPTION =~ s/"/&quot;/sg; +$DESCRIPTION =~ s/'/&apos;/sg; + { package RC; for my $file ("$ENV{HOME}/.virtio-tc-rc") -- MST


  • 2.  Re: [virtio] [PATCH] admin: escape html special characters

    Posted 04-26-2021 10:17
    On Tue, Apr 06, 2021 at 07:41:02AM -0400, Michael S. Tsirkin wrote: > 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 <mst@redhat.com> > --- > virtio-ballot.pl 6 ++++++ > 1 file changed, 6 insertions(+) Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Attachment: signature.asc Description: PGP signature