]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 148488 - more HTML validation fixes
authorbbaetz%student.usyd.edu.au <>
Fri, 28 Jun 2002 07:18:02 +0000 (07:18 +0000)
committerbbaetz%student.usyd.edu.au <>
Fri, 28 Jun 2002 07:18:02 +0000 (07:18 +0000)
r=jouni, gerv

23 files changed:
CGI.pl
buglist.cgi
changepassword.cgi
checksetup.pl
colchange.cgi
defparams.pl
globals.pl
sanitycheck.cgi
showdependencygraph.cgi
template/en/default/account/email/confirm.html.tmpl
template/en/default/account/prefs/prefs.html.tmpl
template/en/default/admin/attachstatus/delete.html.tmpl
template/en/default/admin/attachstatus/list.html.tmpl
template/en/default/attachment/edit.html.tmpl
template/en/default/attachment/show-multiple.html.tmpl
template/en/default/bug/dependency-graph.html.tmpl
template/en/default/bug/process/confirm-duplicate.html.tmpl
template/en/default/bug/process/midair.html.tmpl
template/en/default/bug/show-multiple.html.tmpl
template/en/default/global/code-error.html.tmpl
template/en/default/global/useful-links.html.tmpl
template/en/default/list/edit-multiple.html.tmpl
template/en/default/search/form.html.tmpl

diff --git a/CGI.pl b/CGI.pl
index ea305db53205c4066a41cfc5c77aebb2c0f158c8..b65c74a7526913e2987927fc384e6013010951d0 100644 (file)
--- a/CGI.pl
+++ b/CGI.pl
@@ -353,21 +353,21 @@ sub navigation_links($) {
             my $cur = lsearch(\@bugs, $::FORM{"id"});
 
             if ($cur > 0) {
-                $retval .= "<link rel=\"First\" href=\"show_bug.cgi?id=$bugs[0]\" />\n";
-                $retval .= "<link rel=\"Prev\" href=\"show_bug.cgi?id=$bugs[$cur - 1]\" />\n";
+                $retval .= "<link rel=\"First\" href=\"show_bug.cgi?id=$bugs[0]\">\n";
+                $retval .= "<link rel=\"Prev\" href=\"show_bug.cgi?id=$bugs[$cur - 1]\">\n";
             } 
             if ($cur < $#bugs) {
-                $retval .= "<link rel=\"Next\" href=\"show_bug.cgi?id=$bugs[$cur + 1]\" />\n";
-                $retval .= "<link rel=\"Last\" href=\"show_bug.cgi?id=$bugs[$#bugs]\" />\n";
+                $retval .= "<link rel=\"Next\" href=\"show_bug.cgi?id=$bugs[$cur + 1]\">\n";
+                $retval .= "<link rel=\"Last\" href=\"show_bug.cgi?id=$bugs[$#bugs]\">\n";
             }
 
-            $retval .= "<link rel=\"Up\" href=\"buglist.cgi?regetlastlist=1\" />\n";
-            $retval .= "<link rel=\"Contents\" href=\"buglist.cgi?regetlastlist=1\" />\n";
+            $retval .= "<link rel=\"Up\" href=\"buglist.cgi?regetlastlist=1\">\n";
+            $retval .= "<link rel=\"Contents\" href=\"buglist.cgi?regetlastlist=1\">\n";
         } else {
             # We are on a bug list
-            $retval .= "<link rel=\"First\" href=\"show_bug.cgi?id=$bugs[0]\" />\n";
-            $retval .= "<link rel=\"Next\" href=\"show_bug.cgi?id=$bugs[0]\" />\n";
-            $retval .= "<link rel=\"Last\" href=\"show_bug.cgi?id=$bugs[$#bugs]\" />\n";
+            $retval .= "<link rel=\"First\" href=\"show_bug.cgi?id=$bugs[0]\">\n";
+            $retval .= "<link rel=\"Next\" href=\"show_bug.cgi?id=$bugs[0]\">\n";
+            $retval .= "<link rel=\"Last\" href=\"show_bug.cgi?id=$bugs[$#bugs]\">\n";
         }
     }
     
@@ -972,7 +972,7 @@ sub ThrowTemplateError {
             send it to $maintainer with details of what you were doing at the 
             time this message appeared.
           </p>
-          <script> <!--
+          <script type="text/javascript"> <!--
             document.write("<p>URL: " + document.location + "</p>");
           // -->
           </script>
index edbe4c021574fd36b7471beb9f0add3cb5091141..c2d44de12dc547014b7d624399dd14a32fd0ebcc 100755 (executable)
@@ -832,7 +832,7 @@ sub GenerateSQL {
             $F{"type$chart-$row-$col"} = shift(@$ref);
             $F{"value$chart-$row-$col"} = shift(@$ref);
             if ($debug) {
-                print qq{<P>$F{"field$chart-$row-$col"} | $F{"type$chart-$row-$col"} | $F{"value$chart-$row-$col"}*\n};
+                print qq{<p>$F{"field$chart-$row-$col"} | $F{"type$chart-$row-$col"} | $F{"value$chart-$row-$col"}*</p>\n};
             }
             $col++;
 
@@ -971,7 +971,7 @@ sub GenerateSQL {
                     if ("$f,$t" =~ m/$key/) {
                         my $ref = $funcsbykey{$key};
                         if ($debug) {
-                            print "<P>$key ($f , $t ) => ";
+                            print "<p>$key ($f , $t ) => ";
                         }
                         $ff = $f;
                         if ($f !~ /\./) {
@@ -979,7 +979,7 @@ sub GenerateSQL {
                         }
                         &$ref;
                         if ($debug) {
-                            print "$f , $t , $term";
+                            print "$f , $t , $term</p>";
                         }
                         if ($term) {
                             last;
@@ -1020,7 +1020,7 @@ sub GenerateSQL {
     $query = SelectVisible($query, $::userid, $::usergroupset);
 
     if ($debug) {
-        print "<P><CODE>" . value_quote($query) . "</CODE><P>\n";
+        print "<p><code>" . value_quote($query) . "</code></p>\n";
         exit;
     }
     return $query;
index dafe5c1ae7f2808f1bca58bdcdc7f0911d2af14d..1bc560c17633c1cf0e3aefab664c0bd00ca7595d 100755 (executable)
@@ -24,16 +24,16 @@ use strict;
 
 print q{Content-type: text/html
 
-<HTML>
-<HEAD>
-<META HTTP-EQUIV="Refresh"
-  CONTENT="0; URL=userprefs.cgi">
-</HEAD>
-<BODY>
+<html>
+<head>
+<meta http-equiv="Refresh"
+  content="0; URL=userprefs.cgi">
+</head>
+<body>
 This URL is obsolete.  Forwarding you to the correct one.
-<P>
-Going to <A HREF="userprefs.cgi">userprefs.cgi</A>
-<BR>
-</BODY>
-</HTML>
+<p>
+Going to <a href="userprefs.cgi">userprefs.cgi</a>
+<br>
+</body>
+</html>
 }
index 0f9e2328f3ee3638931a2d5500a6b56add9a9b6f..738f993866cb455f5f5ad4fbdbafd019d0ae6011 100755 (executable)
@@ -806,14 +806,14 @@ if ($my_index_html) {
         open HTML, ">index.html";
         print HTML <<'END';
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML>
-<HEAD>
-<META HTTP-EQUIV="REFRESH" CONTENT="0; URL=index.cgi">
-</HEAD>
-<BODY>
-<H1>I think you are looking for <a href="index.cgi">index.cgi</a></H1>
-</BODY>
-</HTML>
+<html>
+<head>
+<meta http-equiv="Refresh" content="0; URL=index.cgi">
+</head>
+<body>
+<h1>I think you are looking for <a href="index.cgi">index.cgi</a></h1>
+</body>
+</html>
 END
         close HTML;
     }
index 64dd9c4a5dcbab48490149197032f31da78bf2b8..727ad2c9084f245d7786afcd687a1ffa6354119e 100755 (executable)
@@ -88,8 +88,8 @@ if (defined $::FORM{'rememberedquery'}) {
     print "Set-Cookie: SPLITHEADER=$::FORM{'splitheader'} ; path=$cookiepath ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n";
     print "Refresh: 0; URL=buglist.cgi?$::FORM{'rememberedquery'}\n";
     print "\n";
-    print "<META HTTP-EQUIV=Refresh CONTENT=\"1; URL=$urlbase"."buglist.cgi?$::FORM{'rememberedquery'}\">\n";
-    print "<TITLE>What a hack.</TITLE>\n";
+    print "<meta http-equiv=\"Refresh\" content=\"1; URL=$urlbase"."buglist.cgi?$::FORM{'rememberedquery'}\">\n";
+    print "<title>What a hack.</title>\n";
     PutHeader ("Change columns");
     print "Resubmitting your query with new columns...\n";
     exit;
index 2ba6a31c5323a6c94361bac7acf11dfcd61a56b0..f4fd85f6f1c3208e30d077ffc5148e3e59916b5c 100644 (file)
@@ -204,7 +204,7 @@ DefParam("LDAPmailattribute",
 
 
 DefParam("mostfreqthreshold",
-         "The minimum number of duplicates a bug needs to show up on the <A HREF=\"duplicates.cgi\">most frequently reported bugs page</a>. If you have a large database and this page takes a long time to load, try increasing this number.",
+         "The minimum number of duplicates a bug needs to show up on the <a href=\"duplicates.cgi\">most frequently reported bugs page</a>. If you have a large database and this page takes a long time to load, try increasing this number.",
          "t",
          "2");
 
index f32fc1f3d4ce7630a12a6d7bc384a72de3fa3b70..6e84cb0daeba4b388561c43f9a9c5bd7156ad666 100644 (file)
@@ -947,7 +947,7 @@ sub DBNameToIdAndCheck {
     }
 
     $name = html_quote($name);
-    ThrowUserError("The name <TT>$name</TT> is not a valid username.  
+    ThrowUserError("The name <tt>$name</tt> is not a valid username.  
                     Either you misspelled it, or the person has not
                     registered for a Bugzilla account.");
 }
index 4172e6b341c2ae8df2432dd4454dcb7f88aa8e89..706d7dff5aeb9bf824ee3fee9e9ebc9b47659172 100755 (executable)
@@ -55,17 +55,17 @@ my $offervotecacherebuild = 0;
 
 sub Status {
     my ($str) = (@_);
-    print "$str <P>\n";
+    print "$str <p>\n";
 }
 
 sub Alert {
     my ($str) = (@_);
-    Status("<font color=red>$str</font>");
+    Status("<font color=\"red\">$str</font>");
 }
 
 sub BugLink {
     my ($id) = (@_);
-    return "<a href='show_bug.cgi?id=$id'>$id</a>";
+    return "<a href=\"show_bug.cgi?id=$id\">$id</a>";
 }
 
 sub AlertBadVoteCache {
@@ -142,7 +142,7 @@ if (exists $::FORM{'rebuildvotecache'}) {
     Status("Vote cache has been rebuilt.");
 }
 
-print "OK, now running sanity checks.<P>\n";
+print "OK, now running sanity checks.<p>\n";
 
 # This one goes first, because if this is wrong, then the below tests
 # will probably fail too
index 4df71ac49f9a869506153a036d2ea26713b59c65..cf2122540ee84db48be12a23417fef7958663b90 100755 (executable)
@@ -45,10 +45,10 @@ sub CreateImagemap {
     open MAP, "<$mapfilename";
     while(my $line = <MAP>) {
         if($line =~ /^default ([^ ]*)(.*)$/) {
-            $default = qq{<area shape="default" href="$1">\n};
+            $default = qq{<area alt="" shape="default" href="$1">\n};
         }
         if ($line =~ /^rectangle \((.*),(.*)\) \((.*),(.*)\) (http[^ ]*)(.*)?$/) {
-            $map .= qq{<area name="bug$6" shape="rect" href="$5" coords="$1,$4,$3,$2">\n};
+            $map .= qq{<area alt="bug$6" name="bug$6" shape="rect" href="$5" coords="$1,$4,$3,$2">\n};
         }
     }
     close MAP;
index 140c54e0d8ad66cef880defc75a8f98772173c89..0b1ea5334611f3504b8e5dc734d770fed6cf15e0 100644 (file)
@@ -35,7 +35,7 @@
   <table>
     <tr>
       <th align="right">Old Email Address:</th>
-      <td><input type="input" name="email" size="36"></td>
+      <td><input type="text" name="email" size="36"></td>
     </tr>
     <tr>
       <th align="right"> </th>
index 2a232f875abc9ae23347bc1161a9501251b30d1a..d455b5b66a4f55c9b37ae7bde436e9b7c8c2f053 100644 (file)
@@ -97,7 +97,7 @@
 
 <h3>[% current_tab.description %]</h3>
 
-<form method="post">
+<form method="post" action="userprefs.cgi">
   <input type="hidden" name="tab" value="[% current_tab.name %]">
 
   [% PROCESS "account/prefs/${current_tab.name}.html.tmpl" IF current_tab.name.defined %]
index e92b9798523e8628fdb5053ece2576e63d9883d4..0d5285128f37308dfce8aab924b3b4da3f178c3b 100644 (file)
 
 <table>
    <tr>
-      <td colspan=2>
+      <td colspan="2">
          Do you really want to delete this status?
       </td>
    </tr>
    <tr>
       <td>
-         <a href="editattachstatuses.cgi?action=delete&id=[% id %]">
+         <a href="editattachstatuses.cgi?action=delete&amp;id=[% id %]">
             Yes, delete
          </a>
       </td>
index 67d5640aed271f119856319fcef3a35982193a1f..1640d6e1b5c9c1e2f1c1aa73ef1cbecbfbdec031 100644 (file)
       <td>[% statusdef.sortkey %]</td>
       <td>[% statusdef.product FILTER html %]</td>
       <td>
-        <a href="editattachstatuses.cgi?action=edit&id=[% statusdef.id %]">
+        <a href="editattachstatuses.cgi?action=edit&amp;id=[% statusdef.id %]">
             Edit</a>
         &nbsp;|&nbsp;
-        <a href="editattachstatuses.cgi?action=confirmdelete&id=[% statusdef.id %]" 
+        <a href="editattachstatuses.cgi?action=confirmdelete&amp;id=[% statusdef.id %]" 
          onclick="return confirmDelete([% statusdef.attachcount %],
                                        '[% statusdef.name FILTER js %]',
                                        [% statusdef.id %]);">
@@ -76,7 +76,7 @@
   </tr>
 
 </table>
-<script language="JavaScript">
+<script language="JavaScript" type="text/javascript"><!--
   function confirmDelete(attachcount, name, id)
   {
     if (attachcount > 0) {
@@ -94,6 +94,7 @@
     }
     return false;
   }
+-->
 </script>
 
 [% PROCESS global/footer.html.tmpl %]
index 873f73b59eedf0fb97f14121520ffb80f503b40e..ca72647ddfa8f0efc8ab0f15297d65587514eefa 100644 (file)
@@ -53,7 +53,7 @@
       var contentType = '[% contenttype %]';
       if ( contentType == 'text/plain' )
         {
-          theContent = theContent.replace( /^<html><head\/><body><pre>/i , "" );
+          theContent = theContent.replace( /^<html><head\/?><body><pre>/i , "" );
           theContent = theContent.replace( /<\/pre><\/body><\/html>$/i , "" );
           theContent = theContent.replace( /&lt;/gi , "<" );
           theContent = theContent.replace( /&gt;/gi , ">" );
index b3c05f2e2c65a13c4b749086ac7194cb76965fdf..6d192ad89706096f1bc068b0005ef515aebf2ff4 100644 (file)
@@ -86,7 +86,7 @@
   [% ELSE %]
     <p><b>
       Attachment cannot be viewed because its MIME type is not text/*, image/*, or application/vnd.mozilla.*.
-      <a href="attachment.cgi?id=[% a.attachid %]&action=view">Download the attachment instead</a>.
+      <a href="attachment.cgi?id=[% a.attachid %]&amp;action=view">Download the attachment instead</a>.
     </b></p>
   [% END %]
   </div>
index 8206a847bf2cbf34d7baa821c93a0bcce2ff7e7e..2d505a3716b70ad5355e1e806dc886713b85d10f 100644 (file)
 </p>
 
 [% IF image_map %]
-  <img src="[% image_url %]" usemap="#imagemap"> 
+  <img src="[% image_url %]" alt="Dependency graph" usemap="#imagemap"> 
 [% ELSE %]
   <a href="[% map_url %]">
-    <img src="[% image_url %]" ismap="ismap"> 
+    <img src="[% image_url %]" alt="Dependency graph" ismap="ismap"> 
   </a>
 [% END %]
 
 <hr>
 
-<form>
+<form action="showdependencygraph.cgi">
   <table>
     <tr>
       <td>
index 1725719005f6a1c66bf4d0014518036a3919981d..ff87216536f018f112444cd61a9c74c583a42722 100644 (file)
@@ -49,7 +49,7 @@
   Do you wish to do this?
 </p>
     
-<form method="post">
+<form method="post" action="process_bug.cgi">
 
 [% PROCESS "global/hidden-fields.html.tmpl" exclude="^(Bugzilla|LDAP)_(login|password)$" %]
 
index a30e89b3ca474a42f0754b2006d46a274c642c4a..24766aa04319830fc3feabc97383cb3ca98c4cf5 100644 (file)
@@ -59,7 +59,7 @@ You have the following choices:
 
 <ul>
   <li>
-    <form method="post">
+    <form method="post" action="process_bug.cgi">
       [% PROCESS "global/hidden-fields.html.tmpl" exclude="^(Bugzilla|LDAP)_(login|password)$" %]
       <input type="submit" value="Submit my changes anyway">
         This will cause all of the above changes to be overwritten
index 0e73f4ad72cc272aa981915f64a2cd7460cbddf3..7c3e7407f994b3e85b66749a2d5417d605376f4c 100644 (file)
@@ -42,7 +42,7 @@
 [%###########################################################################%]
 
 [% BLOCK bug_display %]
-  <img src="1x1.gif" width="1" height="80" align="left">
+  <img alt="" src="1x1.gif" width="1" height="80" align="left">
   <div align="center">
     <b>
       <font ="+3">Bug [% bug.bug_id %] - [% bug.short_desc FILTER html %]</font>
index 637fba6b1bb3dedb87513c4a37e3e9acceb64254..4b5ac2f67aa15bbc53299a133998ae7866602e80 100644 (file)
@@ -36,7 +36,7 @@
     it to [% Param("maintainer") %] with details of what you were doing at 
     the time this message appeared.
   </p>
-  <script> <!--
+  <script type="text/javascript"> <!--
     document.write("<p>URL: " + document.location + "</p>");
   // -->
   </script>
index 807c316b64289ad80c08b4cf045f3b20b9b55a0b..d8c4437754582d5e394e6fe20664876595f7401f 100644 (file)
@@ -43,7 +43,7 @@
         Actions:
       </td>
       
-      <td valign="middle" nowrap>
+      <td valign="middle" nowrap="nowrap">
         <a href="enter_bug.cgi">New</a> | 
         <a href="query.cgi">Query</a> |
         
 
       <td valign="middle">
         Edit <a href="userprefs.cgi">prefs</a>
-        [% ", <a href='editparams.cgi'>parameters</a>" 
+        [% ', <a href="editparams.cgi">parameters</a>' 
                                                    IF user.groups.tweakparams %]
-        [% ", <a href='editusers.cgi'>users</a>"     IF user.groups.editusers 
+        [% ', <a href="editusers.cgi">users</a>'     IF user.groups.editusers 
                                                   || (user.blessgroupset > 0) %]
-        [% ", <a href='editproducts.cgi'>products</a>" 
+        [% ', <a href="editproducts.cgi">products</a>' 
                                                 IF user.groups.editcomponents %]
-        [% ", <a href='editattachstatuses.cgi'> attachment&nbsp;statuses</a>" 
+        [% ', <a href="editattachstatuses.cgi"> attachment&nbsp;statuses</a>'
                                                 IF user.groups.editcomponents %]
-        [% ", <a href='editgroups.cgi'>groups</a>" 
+        [% ', <a href="editgroups.cgi">groups</a>' 
                                                   IF user.groups.creategroups %]
-        [% ", <a href='editkeywords.cgi'>keywords</a>" 
+        [% ', <a href="editkeywords.cgi">keywords</a>' 
                                                   IF user.groups.editkeywords %]
-        [% " | <a href='sanitycheck.cgi'>Sanity&nbsp;check</a>" 
+        [% ' | <a href="sanitycheck.cgi">Sanity&nbsp;check</a>' 
                                                    IF user.groups.tweakparams %]
 
         | <a href="relogin.cgi">Log&nbsp;out</a>&nbsp;[% user.login %]
index eb8e759bed5850cf0b1afbaaefe07644999333ab..a9ee9a121bf3341d5b9777c0212c0b4fea8cf59b 100644 (file)
   <select name="resolution" onchange="document.forms.changeform.knob[[% knum %]].checked=true">
     [% FOREACH resolution = resolutions %]
       [% NEXT IF !resolution %]
-      <option value="[% resolution FILTER html %]" [% selected IF resolution == "FIXED" %]>
+      <option value="[% resolution FILTER html %]" [% 'selected="selected"' IF resolution == "FIXED" %]>
         [% resolution FILTER html %]
       </option>
     [% END %]
index 8627b448a9f5eaac891bf9a6cc122c68f60ad05e..6de37286f21c20c63f13ec8c6bc04de2219db27b 100644 (file)
@@ -651,8 +651,6 @@ function selectProduct(f) {
   </tr>
 </table>
 
-[%# Note: the <form> tag is unclosed at the end of this template %]
-
 [%############################################################################%]
 [%# Block for SELECT fields                                                  #%]
 [%############################################################################%]