[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [OSSTEST PATCH 47/60] history reporting (nfc): Break out url_quote
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- Osstest/HistoryReport.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Osstest/HistoryReport.pm b/Osstest/HistoryReport.pm index bfbee28c..f30ded5b 100644 --- a/Osstest/HistoryReport.pm +++ b/Osstest/HistoryReport.pm @@ -156,6 +156,12 @@ sub cache_read_previous ($) { close H; } +sub url_quote ($) { + local ($_) = "$_[0]"; + s{[^-+=/~:;_.,\w]}{ sprintf "%%%02x", ord $& }ge; + $_; +} + sub cache_row_lookup_prep ($) { my ($jrr) = @_; @@ -179,8 +185,7 @@ sub cache_write_entry ($$) { next if $k =~ m/^\%/; $_ = $h->{$k}; next unless defined; - s{[^-+=/~:;_.,\w]}{ sprintf "%%%02x", ord $& }ge; - printf $fh " %s=%s", $k, $_; + printf $fh " %s=%s", $k, url_quote($_); } }; $whash->($jr); -- 2.11.0
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |