escape out since we're rendering and wrapping HTML around it
authorJason Etheridge <jason@esilibrary.com>
Fri, 11 Sep 2015 21:13:37 +0000 (17:13 -0400)
committerJason Etheridge <jason@esilibrary.com>
Fri, 11 Sep 2015 21:13:37 +0000 (17:13 -0400)
qa/test_output_webifier.pl

index 7508209..b91748d 100755 (executable)
@@ -3,6 +3,9 @@
 # This script assumes git checkouts at ~/git/Evergreen and ~/git/OpenSRF that
 # correspond to branches used to produce the test output being parsed.
 
+use CGI qw(:standard escapeHTML);
+my $q = CGI->new;
+
 my $state = 'skipping';
 my $error_count = 0;
 my $subpage_count = 0;
@@ -98,7 +101,7 @@ while (my $line = <>) {
             $class = '';
         }
         chomp $line;
-        my $html_line = "<span class='$class'>$line</span>";
+        my $html_line = "<span class='$class'>" . $q->escapeHTML($line) . "</span>";
         print SUB_PAGE "$html_line\n";
     }
     if ($line =~ /=~-\._/) {