Menu

#10 XHTML Compliant Debugging Output

open
nobody
None
5
2005-08-20
2005-08-20
Adrian
No

Three minor edits to change usage of <br> and <hr> to
the XHTML-valid <br /> and <hr /> for those serving
their pages as XHTML.

*** adodb.inc.php 2005-02-24 01:32:11.000000000 -0500
--- adodb.inc.php 2005-08-09 20:48:33.356358400 -0400
***************
*** 373,379 ****
return;
}

! if ($newline) $msg .= "<br>\n";

if (isset($HTTP_SERVER_VARS['HTTP_USER_AGENT']) ||
!$newline) echo $msg;
else echo strip_tags($msg);
--- 373,379 ----
return;
}

! if ($newline) $msg .= "<br />\n";

if (isset($HTTP_SERVER_VARS['HTTP_USER_AGENT']) ||
!$newline) echo $msg;
else echo strip_tags($msg);

*** adodb-lib.inc.php 2005-02-24 01:32:10.000000000 -0500
--- adodb-lib.inc.php 2005-08-09 09:21:50.720013500 -0400
***************
*** 818,826 ****
if ($inBrowser) {
$ss = htmlspecialchars($ss);
if ($zthis->debug === -1)
! ADOConnection::outp( "<br>\n($dbt):
".htmlspecialchars($sqlTxt)." &nbsp;
<code>$ss</code>\n<br>\n",false);
else
! ADOConnection::outp( "<hr>\n($dbt):
".htmlspecialchars($sqlTxt)." &nbsp;
<code>$ss</code>\n<hr>\n",false);
} else {
ADOConnection::outp("-----\n($dbt):
".$sqlTxt."\n-----\n",false);
}
--- 818,826 ----
if ($inBrowser) {
$ss = htmlspecialchars($ss);
if ($zthis->debug === -1)
! ADOConnection::outp( "<br />\n($dbt):
".htmlspecialchars($sqlTxt)." &nbsp;
<code>$ss</code>\n<br />\n",false);
else
! ADOConnection::outp( "<hr />\n($dbt):
".htmlspecialchars($sqlTxt)." &nbsp;
<code>$ss</code>\n<hr />\n",false);
} else {
ADOConnection::outp("-----\n($dbt):
".$sqlTxt."\n-----\n",false);
}

Discussion

  • Adrian

    Adrian - 2005-08-20

    TAR'd patch files

     
  • Peter "mash" Morgan

    Logged In: YES
    user_id=405789
    Originator: NO

    Hopefully no one will see errors, let alone then being xhtml compliant so this is pretty pointless imho.