From patchwork Fri May 31 12:21:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 247936 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 31A672C02C3 for ; Fri, 31 May 2013 22:21:48 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754438Ab3EaMVi (ORCPT ); Fri, 31 May 2013 08:21:38 -0400 Received: from zoneX.GCU-Squad.org ([194.213.125.0]:26092 "EHLO services.gcu-squad.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753117Ab3EaMVi (ORCPT ); Fri, 31 May 2013 08:21:38 -0400 Received: from jdelvare.pck.nerim.net ([62.212.121.182] helo=endymion.delvare) by services.gcu-squad.org (GCU Mailer Daemon) with esmtpsa id 1UiOKu-0007Zi-S8 (TLSv1:AES128-SHA:128) (envelope-from ) for linux-i2c@vger.kernel.org; Fri, 31 May 2013 14:21:37 +0200 Date: Fri, 31 May 2013 14:21:31 +0200 From: Jean Delvare To: Linux I2C Subject: [PATCH 2/2] sensors-detect: Generate XHTML 1.0 compliant markup Message-ID: <20130531142131.5b7c6112@endymion.delvare> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.18; x86_64-suse-linux-gnu) Mime-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org In HTML output mode, generate XHTML 1.0 compliant markup. --- eeprom/decode-dimms | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) --- i2c-tools.orig/eeprom/decode-dimms 2013-05-31 14:08:38.414677214 +0200 +++ i2c-tools/eeprom/decode-dimms 2013-05-31 14:14:19.065234816 +0200 @@ -413,7 +413,7 @@ sub html_encode($) $text =~ s//\>/sg; $text =~ s/ degrees C/\°C/sg; - $text =~ s/\n/
\n/sg; + $text =~ s/\n/\n/sg; return $text; } @@ -438,11 +438,11 @@ sub real_printl($$) # print a line w/ la if ($opt_html) { $label = html_encode($label); @values = map { html_encode($_) } @values; - print "$label"; + print "$label"; if (!$opt_merge) { print "$_" foreach @values; } elsif ($same_values) { - print "$values[0]"; + print "$values[0]"; } else { # For HTML output, merge adjacent cells even if # the whole line cannot be merged. @@ -451,7 +451,7 @@ sub real_printl($$) # print a line w/ la $colcnt++; my $value = shift @values; next if (@values && $value eq $values[0]); - print " 1 ? " colspan=$colcnt" : "") .">$value"; + print " 1 ? " colspan=\"$colcnt\"" : "") .">$value"; $colcnt = 0; } } @@ -508,7 +508,7 @@ sub real_prints($) # print separator w/ $ncol = 1 unless $ncol; if ($opt_html) { $label = html_encode($label); - print "$label\n"; + print "$label\n"; } else { print "\n---=== $label ===---\n"; } @@ -2167,9 +2167,10 @@ if (!$opt_igncheck) { if ($opt_html && !$opt_bodyonly) { - print "\n", - "\n", - "\t\n", + print "\n\n", + "\n", + "\n", + "\t\n", "\tPC DIMM Serial Presence Detect Tester/Decoder Output\n", "\n"; } @@ -2355,7 +2356,7 @@ for $current (0 .. $#dimm) { printl2("\n\nDecoding EEPROM", $dimm[$current]->{file}, "text-decoration: underline; font-weight: bold;"); } - print "\n" if $opt_html; + print "
\n" if $opt_html; my @output = @{$dimm[$current]->{output}}; for (my $line = 0; $line < @output; $line++) {