Processed: Re: Bug#432038: qa.debian.org: DDPO HTML does not validate

2007-07-09 Thread Debian Bug Tracking System
Processing commands for [EMAIL PROTECTED]:

 tags 432038 patch
Bug#432038: qa.debian.org: DDPO HTML does not validate
There were no tags set.
Tags added: patch

 thanks
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#432038: qa.debian.org: DDPO HTML does not validate

2007-07-09 Thread Thijs Kinkhorst
tags 432038 patch
thanks

Hi,

On Saturday 7 July 2007 00:13, Felix C. Stegerman wrote:
 Visting http://qa.debian.org/[EMAIL PROTECTED],
 I saw a Valid HTML 4.0! image and [on impulse] clicked on it.  To my
 surprise, the page did not validate!

Here's a patch that fixes this, against current SVN.

isset() will also match parameters that are the empty string,
which is the default for some parameters in the function definition, and will 
thus cause output like 'rowspan='. Use empty() which will handle this 
correctly.


Thijs
Index: common-html.php
===
--- common-html.php	(revision 1561)
+++ common-html.php	(working copy)
@@ -199,9 +199,9 @@
 */
 function html_td($data, $width = , $colspan = , $rowspan = )
 {
-if (isset($width)) $width =  width=\.$width.\;
-if (isset($rowspan)) $rowspan =  rowspan=\.$rowspan.\;
-if (isset($colspan)) $colspan =  colspan=\.$colspan.\;
+if (!empty($width)) $width =  width=\.$width.\;
+if (!empty($rowspan)) $rowspan =  rowspan=\.$rowspan.\;
+if (!empty($colspan)) $colspan =  colspan=\.$colspan.\;
 return td.$width.$rowspan.$colspan..$data./td\n;
 }
 
@@ -256,8 +256,8 @@
 */
 function html_a($text, $link, $class = , $title = )
 {
-if (isset($title)) $title =  title=\.$title.\;
-if (isset($class)) $class =  class=\.$class.\;
+if (!empty($title)) $title =  title=\.$title.\;
+if (!empty($class)) $class =  class=\.$class.\;
 return a.$class. href=\.$link.\.$title..$text./a;
 }
 function html_a_name($text, $name)


pgpufu9yGQ6iM.pgp
Description: PGP signature


Bug#432038: qa.debian.org: DDPO HTML does not validate

2007-07-06 Thread Felix C. Stegerman
Package: qa.debian.org
Severity: minor

Visting http://qa.debian.org/[EMAIL PROTECTED],
I saw a Valid HTML 4.0! image and [on impulse] clicked on it.  To my
surprise, the page did not validate!


- Felix


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (900, 'unstable'), (890, 'testing'), (880, 'stable'), (870, 
'experimental')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.21-1-powerpc
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

-- 
Felix C. Stegerman [EMAIL PROTECTED]  http://obfusk.net
~ Any sufficiently advanced bug is indistinguishable from a feature.
~   -- R. Kulawiec
~ vim: set ft=mail tw=70 sw=2 sts=2 et:


signature.asc
Description: Digital signature