diff --git a/src/lib/Hydra/Controller/Root.pm b/src/lib/Hydra/Controller/Root.pm index e67d909a..3602099f 100644 --- a/src/lib/Hydra/Controller/Root.pm +++ b/src/lib/Hydra/Controller/Root.pm @@ -13,6 +13,7 @@ use Number::Bytes::Human qw(format_bytes); use Encode; use File::Basename; use JSON::MaybeXS; +use HTML::Entities; use List::Util qw[min max]; use List::SomeUtils qw{any}; use Net::Prometheus; @@ -229,7 +230,7 @@ sub machines :Local Args(0) { $c->stash->{pretty_percent} = sub { my ($percent) = @_; my $ret = sprintf('%.2f', $percent); - return (' ' x (6 - length($ret))) . $ret; + return (' ' x (6 - length($ret))) . encode_entities($ret); }; $self->status_ok($c, entity => $c->stash->{machines}); } diff --git a/src/root/common.tt b/src/root/common.tt index 38bb64f2..b18d33f7 100644 --- a/src/root/common.tt +++ b/src/root/common.tt @@ -444,9 +444,9 @@ BLOCK renderInputDiff; %] BLOCK renderPager %]