From 158d2ead02f2573b26641de50ac5498a132ed01a Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 24 Feb 2011 21:01:31 -0800 Subject: [PATCH] results2html: Properly encode output in UTF-8. Otherwise quote marks appear as funny characters. --- results2html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/results2html b/results2html index 4e3224fca3..a5a7688e5a 100755 --- a/results2html +++ b/results2html @@ -4,9 +4,13 @@ use strict; use warnings; use File::Spec; -use HTML::Entities; +use HTML::Entities qw(); use URI::Escape; +sub encode_entities { + return HTML::Entities::encode_entities($_[0], "<&>'\""); +} + my $gitweb_url = 'http://benpfaff.org/cgi-bin/gitweb.cgi?p=pspp;a=blob;f=[FILE];hb=[BRANCH]#l[LINE]'; open (LOG, '<', "LOG"); @@ -15,6 +19,7 @@ open (LOG_HTML, '>', "log.html"); print LOG_HTML < + -- 2.30.2