diff mbox series

[OSSTEST,49/60] history reporting (nfc): Break out $url_ok_chars

Message ID 20200814172205.9624-50-ian.jackson@eu.citrix.com (mailing list archive)
State New, archived
Headers show
Series Speed up sg-report-job-history | expand

Commit Message

Ian Jackson Aug. 14, 2020, 5:21 p.m. UTC
We will want this in a moment.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/HistoryReport.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/Osstest/HistoryReport.pm b/Osstest/HistoryReport.pm
index f8a49955..75ec75f3 100644
--- a/Osstest/HistoryReport.pm
+++ b/Osstest/HistoryReport.pm
@@ -45,6 +45,8 @@  BEGIN {
 
 use POSIX;
 
+our $url_ok_chars = '-+=/~:;_.,\w';
+
 our @key_cols;
 
 our $taskprint='';
@@ -163,7 +165,7 @@  sub url_unquote ($) {
 
 sub url_quote ($) {
     local ($_) = "$_[0]";
-    s{[^-+=/~:;_.,\w]}{ sprintf "%%%02x", ord $& }ge;
+    s{[^$url_ok_chars]}{ sprintf "%%%02x", ord $& }ge;
     $_;
 }