Welcome Guest, Not a member yet? Register   Sign In
XHTML Profiler
#1

[eluser]wolfman2000[/eluser]
Maybe I'm just anal, but I am developing my website using XHTML. I have it set to the proper mime type (unless IE gets in the way Tongue ), but I use the Profiler on my development area to be sure I use the right queries. I noticed upon using the W3C Validator that the profiler code causes validation problems.

Below is the diff file that shows the changes I made to system/libraries/Profiler.php to bring things closer to proper XHTML compliance. Have a look, and see if you can fix what's left for the next release.

Code:
86c86
<             $output .= "<tr><td style='width:50%;color:#000;font-weight:bold;background-color:#ddd;'>".$key."&nbsp;&nbsp;</td><td style='width:50%;color:#990000;font-weight:normal;background-color:#ddd;'>".$val."</td></tr>\n";

---
>             $output .= "<tr><td width='50%' style='color:#000;font-weight:bold;background-color:#ddd;'>".$key."&nbsp;&nbsp;</td><td width='50%' style='color:#990000;font-weight:normal;background-color:#ddd;'>".$val."</td></tr>\n";

114c114
<             $output .="<tr><td style='width:100%;color:#0000FF;font-weight:normal;background-color:#eee;'>".$this->CI->lang->line('profiler_no_db')."</td></tr>\n";

---
>             $output .="<tr><td width='100%' style='color:#0000FF;font-weight:normal;background-color:#eee;'>".$this->CI->lang->line('profiler_no_db')."</td></tr>\n";

124c124
<                 $output .= "<tr><td style='width:100%;color:#0000FF;font-weight:normal;background-color:#eee;'>".$this->CI->lang->line('profiler_no_queries')."</td></tr>\n";

---
>                 $output .= "<tr><td width='100%' style='color:#0000FF;font-weight:normal;background-color:#eee;'>".$this->CI->lang->line('profiler_no_queries')."</td></tr>\n";

140c140
<                     $output .= "<tr><td style='verticle-align:top;width:1%;color:#990000;font-weight:normal;background-color:#ddd;'>".$time."&nbsp;&nbsp;</td><td style='color:#000;font-weight:normal;background-color:#ddd;'>".$val."</td></tr>\n";

---
>                     $output .= "<tr><td width='1%' valign='top' style='color:#990000;font-weight:normal;background-color:#ddd;'>".$time."&nbsp;&nbsp;</td><td style='color:#000;font-weight:normal;background-color:#ddd;'>".$val."</td></tr>\n";

183c183
<                 $output .= "<tr><td style='width:50%;color:#000;background-color:#ddd;'>$_GET[".$key."]&nbsp;&nbsp; </td><td style='width:50%;color:#cd6e00;font-weight:normal;background-color:#ddd;'>";

---
>                 $output .= "<tr><td width='50%' style='color:#000;background-color:#ddd;'>$_GET[".$key."]&nbsp;&nbsp; </td><td width='50%' style='color:#cd6e00;font-weight:normal;background-color:#ddd;'>";

233,234c233,234
< //                $output .= "<tr><td style='width:50%;color:#000;background-color:#ddd;'>$_POST[".$key."]&nbsp;&nbsp;</td><td style='width:50%;color:#009900;font-weight:normal;background-color:#ddd;'>".htmlspecialchars(stripslashes($val))."</td></tr>\n";

<                 $output .= "<tr><td style='width:50%;color:#000;background-color:#ddd;'>$_POST[".$key."]&nbsp;&nbsp; </td><td style='width:50%;color:#009900;font-weight:normal;background-color:#ddd;'>";

---
> //                $output .= "<tr><td width='50%' style='color:#000;background-color:#ddd;'>$_POST[".$key."]&nbsp;&nbsp;</td><td width='50%' style='color:#009900;font-weight:normal;background-color:#ddd;'>".htmlspecialchars(stripslashes($val))."</td></tr>\n";

>                 $output .= "<tr><td width='50%' style='color:#000;background-color:#ddd;'>$_POST[".$key."]&nbsp;&nbsp; </td><td width='50%' style='color:#009900;font-weight:normal;background-color:#ddd;'>";

325c325
<         $output = '<p style="clear: both;">&nbsp;</p>';

---
>         $output = '<br clear="all" />';
#2

[eluser]frenzal[/eluser]
seeing as profiler is never used on your live application it doesn't really matter how it validates, bit of a waste of time if you ask me, so yeah a bit anal :p
#3

[eluser]Tom Glover[/eluser]
You never know. It may save people pulling there hair out, during dev because they created a nice design in xhtml, then to find it broken by something, latter after hair loss finding out it was broken by the profiler.




Theme © iAndrew 2016 - Forum software by © MyBB