Fixed W3C HTML Validator compliance
authorshort <>
Thu, 16 Aug 2001 01:49:00 +0000 (01:49 +0000)
committershort <>
Thu, 16 Aug 2001 01:49:00 +0000 (01:49 +0000)
index.php
obsah.php

index 663b19a..2f058c8 100644 (file)
--- a/index.php
+++ b/index.php
@@ -25,7 +25,7 @@ function title_table_month($year,$month,$month_last)
        $name=        "$year/$month_full";
        print("<a href=\"${base}.jpg\">"
                        ."<img src=\"${base}s.jpg\" ".img_size(98,138)." alt=\"titulní stránka $name\" /></a><br />\n"
-                       ."<a href=\"obsah.php?year=$year&month=$month\">obsah $name</a>"
+                       ."<a href=\"obsah.php?year=$year&amp;month=$month\">obsah $name</a>"
                        );
 }
 
@@ -45,7 +45,7 @@ while ($row=mysql_fetch_array($result)) {
 
                $year=$row["year"];
                print("<table border=\"0\" width=\"100%\"><tr><td align=\"center\"><table border=\"1\" cellpadding=\"5\">\n"
-                               ."<tr><th colspan=\"$split\">Roèník $year (<a href=\"obsah.php?year=$year\">obsahy èísel</a>)</td></tr>\n"
+                               ."<tr><th colspan=\"$split\">Roèník $year (<a href=\"obsah.php?year=$year\">obsahy èísel</a>)</th></tr>\n"
                                );
                $fin_year="</table></td></tr></table>\n";
                $month=-$split;
index 4addde7..3a8f994 100644 (file)
--- a/obsah.php
+++ b/obsah.php
@@ -33,7 +33,7 @@
        while ($row=mysql_fetch_array($result)) {
                if (!$month)
                        print("<h2>Èíslo ".$row["year"]."/".month_full($row["year"],$row["month"],$row["month_last"])."</h2>\n");
-               $contents=$sep_obsah_contents.$row["contents"];
+               $contents=htmlspecialchars($sep_obsah_contents.$row["contents"]);
                $contents=ereg_replace("http://[^[:space:]$page_obsah_contents$sep_obsah_contents]+",
                                "<a href=\"\\0\">\\0</a>",$contents);
                $contents=ereg_replace("$page_obsah_contents([^$sep_obsah_contents]+)",