]> git.sur5r.net Git - contagged/commitdiff
HTML validity fixes
authorAndreas Gohr <gohr@cosmocode.de>
Mon, 25 Jun 2007 11:21:43 +0000 (13:21 +0200)
committerAndreas Gohr <gohr@cosmocode.de>
Mon, 25 Jun 2007 11:21:43 +0000 (13:21 +0200)
darcs-hash:20070625112143-6e07b-e02dd73d250161681e04305364b67b473840f3a1.gz

inc/init.php
inc/smarty/plugins/modifier.noteparser.php
templates/entry_edit.tpl
templates/entry_map.tpl
templates/entry_show.tpl
templates/list_entry.tpl
templates/list_map_entry.tpl
templates/orgs.tpl

index 6d16606874342a75773063bb01f0e6e40015a5d6..c6097b2358219d33dfa471a6ca34567b0bfd5780 100644 (file)
@@ -10,6 +10,7 @@
   define('NL',"\n");
 
   //init session
+  @ini_set('arg_separator.output', '&amp;');
   session_name("ldapab");
   session_start();
 
index 0f96f0042a27481f1418a70fffeba1fed14d1683..10b145ab5ed0c7d6934ec9c9ffac18a379dd5102 100644 (file)
@@ -36,7 +36,7 @@ function smarty_modifier_noteparser($string){
     $string = preg_replace('!\n\n+!','</p><p>',$string);
     $string = nl2br($string);
 
-    return '<p>'.$string.'</p>';
+    return '<p>'.$string.'&nbsp;</p>';
 }
 
 /* vim: set expandtab: */
index bfaad4d2e6bfb63ff10b76712e384a48452a9e9c..62b43d27a3ab9b3e7c5be9690369c402d05b8281 100644 (file)
@@ -4,7 +4,7 @@
 
 <h1>
   {if $entry.type != ''}
-  <img src="pix/{$entry.type|h}.png" border="0" width="22" height="22" align="middle" title="{$entry.type|h}">
+  <img src="pix/{$entry.type|h}.png" border="0" width="22" height="22" align="middle" title="{$entry.type|h}" alt="" />
   {/if}
   {$entry.givenname|h} {$entry.name|h}
 </h1>
 {* always required ... if $fields.name *}
         <tr>
           <th>{$lang.name}:</th>
-          <td><input type="text" class="input ac" name="entry[name]" value="{$entry.name|h}" id="firstfield"></td>
+          <td><input type="text" class="input ac" name="entry[name]" value="{$entry.name|h}" id="firstfield" /></td>
         </tr>
 {* /if *}
 {if $fields.givenname}
         <tr>
           <th>{$lang.givenname}:</th>
-          <td><input type="text" class="input ac" name="entry[givenname]" value="{$entry.givenname|h}"></td>
+          <td><input type="text" class="input ac" name="entry[givenname]" value="{$entry.givenname|h}" /></td>
         </tr>
 {/if}
 {if $fields.title}
         <tr>
           <th>{$lang.title}:</th>
-          <td><input type="text" class="input ac" name="entry[title]" value="{$entry.title|h}"></td>
+          <td><input type="text" class="input ac" name="entry[title]" value="{$entry.title|h}" /></td>
         </tr>
 {/if}
       </table>
         <tr>
           <th>{$lang.organization}:</th>
           <td>
-            <input type="text" class="input ac" name="entry[organization]" value="{$entry.organization|h}">
+            <input type="text" class="input ac" name="entry[organization]" value="{$entry.organization|h}" />
           </td>
         </tr>
 {/if}
 {if $fields.office}
         <tr>
           <th>{$lang.office}:</th>
-          <td><input type="text" class="input ac" name="entry[office]" value="{$entry.office|h}"></td>
+          <td><input type="text" class="input ac" name="entry[office]" value="{$entry.office|h}" /></td>
         </tr>
 {/if}
 {if $fields.street}
         <tr>
           <th>{$lang.street}:</th>
-          <td><input type="text" class="input ac" name="entry[street]" value="{$entry.street|h}"></td>
+          <td><input type="text" class="input ac" name="entry[street]" value="{$entry.street|h}" /></td>
         </tr>
 {/if}
 {if $fields.zip}
         <tr>
           <th>{$lang.zip}:</th>
-          <td><input type="text" class="input ac" name="entry[zip]" value="{$entry.zip|h}"></td>
+          <td><input type="text" class="input ac" name="entry[zip]" value="{$entry.zip|h}" /></td>
         </tr>
 {/if}
 {if $fields.location}
         <tr>
           <th>{$lang.location}:</th>
-          <td><input type="text" class="input ac" name="entry[location]" value="{$entry.location|h}"></td>
+          <td><input type="text" class="input ac" name="entry[location]" value="{$entry.location|h}" /></td>
         </tr>
 {/if}
 {if $fields.state}
         <tr>
           <th>{$lang.state}:</th>
-          <td><input type="text" class="input ac" name="entry[state]" value="{$entry.state|h}"></td>
+          <td><input type="text" class="input ac" name="entry[state]" value="{$entry.state|h}" /></td>
         </tr>
 {/if}
 {if $fields.country}
         <tr>
           <td align="right" valign="top">{$lang.country}:</td>
           <td>
-            <input type="text" class="input ac" name="entry[country]" value="{$entry.country|h}"><br />
+            <input type="text" class="input ac" name="entry[country]" value="{$entry.country|h}" /><br />
           </td>
         </tr>
 {/if}
 {if $fields.phone}
         <tr>
           <th>{$lang.phone}:</th>
-          <td><input type="text" class="input" name="entry[phone]" value="{$entry.phone|h}"></td>
+          <td><input type="text" class="input" name="entry[phone]" value="{$entry.phone|h}" /></td>
         </tr>
 {/if}
 {if $fields.switchboard}
         <tr>
           <th>{$lang.switchboard}:</th>
-          <td><input type="text" class="input" name="entry[switchboard]" value="{$entry.switchboard|h}"></td>
+          <td><input type="text" class="input" name="entry[switchboard]" value="{$entry.switchboard|h}" /></td>
         </tr>
 {/if}
 {if $fields.fax}
         <tr>
           <th>{$lang.fax}:</th>
-          <td><input type="text" class="input" name="entry[fax]" value="{$entry.fax|h}"></td>
+          <td><input type="text" class="input" name="entry[fax]" value="{$entry.fax|h}" /></td>
         </tr>
 {/if}
 {if $fields.pager}
         <tr>
           <th>{$lang.pager}:</th>
-          <td><input type="text" class="input" name="entry[pager]" value="{$entry.pager|h}"></td>
+          <td><input type="text" class="input" name="entry[pager]" value="{$entry.pager|h}" /></td>
         </tr>
 {/if}
 {if $fields.manager}
 {if $fields.position}
         <tr>
           <td align="right" valign="top">{$lang.position}:</td>
-          <td><input type="text" class="input ac" name="entry[position]" value="{$entry.position|h}"></td>
+          <td><input type="text" class="input ac" name="entry[position]" value="{$entry.position|h}" /></td>
         </tr>
 {/if}
 {if $fields.department}
         <tr>
           <td align="right" valign="top">{$lang.department}:</td>
-          <td><input type="text" class="input ac" name="entry[department]" value="{$entry.department|h}"></td>
+          <td><input type="text" class="input ac" name="entry[department]" value="{$entry.department|h}" /></td>
         </tr>
 {/if}
 
 
       <table width="100%">
         <tr>
-          <td colspan="2"><h3>{$lang.private}</b></h3>
+          <td colspan="2"><h3>{$lang.private}</h3></td>
         </tr>
 {if $fields.homestreet}
         <tr>
 {if $fields.homephone}
         <tr>
           <th>{$lang.homephone}:</th>
-          <td><input type="text" class="input" name="entry[homephone]" value="{$entry.homephone|h}"></td>
+          <td><input type="text" class="input" name="entry[homephone]" value="{$entry.homephone|h}" /></td>
         </tr>
 {/if}
 {if $fields.mobile}
         <tr>
           <th>{$lang.mobile}:</th>
-          <td><input type="text" class="input" name="entry[mobile]" value="{$entry.mobile|h}"></td>
+          <td><input type="text" class="input" name="entry[mobile]" value="{$entry.mobile|h}" /></td>
         </tr>
 {/if}
 {if $fields.photo}
         <tr>
           <th>{$lang.photo}:<br /><span class="hint">({$lang.msg_jpegonly})</span></th>
           <td>{if $entry.photo}
-                <input type="checkbox" class="radio" name="delphoto" id="delphoto" value="1">
+                <input type="checkbox" class="radio" name="delphoto" id="delphoto" value="1" />
                 <label for="delphoto">{$lang.delphoto}</label>
                 <br />
               {/if}
-            <input type="file" class="input" name="photoupload">
+            <input type="file" class="input" name="photoupload" />
           </td>
         </tr>
 {/if}
 {if $fields.birthday}
         <tr>
           <td align="right" valign="top">{$lang.birthday}:<br /><span class="hint">({$lang.msg_dateformat})</span></td>
-          <td><input type="text" class="input" name="entry[birthday]" value="{$entry.birthday|h}" maxlength="10"></td>
+          <td><input type="text" class="input" name="entry[birthday]" value="{$entry.birthday|h}" maxlength="10" /></td>
         </tr>
 {/if}
 {if $fields.anniversary}
         <tr>
           <th>{$lang.anniversary}:<br /><span class="hint">({$lang.msg_dateformat})</span></th>
-          <td><input type="text" class="input" name="entry[anniversary]" value="{$entry.anniversary|h}" maxlength="10"></td>
+          <td><input type="text" class="input" name="entry[anniversary]" value="{$entry.anniversary|h}" maxlength="10" /></td>
         </tr>
 {/if}
 {if $fields.spouse}
         <tr>
           <th>{$lang.spouse}:</th>
-          <td><input type="text" class="input" name="entry[spouse]" value="{$entry.spouse|h}"></td>
+          <td><input type="text" class="input" name="entry[spouse]" value="{$entry.spouse|h}" /></td>
         </tr>
 {/if}
 
 {if $fields.url}
         <tr>
           <th>{$lang.url}:</th>
-          <td><input type="text" class="input" name="entry[url]" value="{$entry.url|h}"></td>
+          <td><input type="text" class="input" name="entry[url]" value="{$entry.url|h}" /></td>
         </tr>
 {/if}
 {if $fields._mail}
         {foreach from=$entry.mail|smarty:nodefaults item=mail}
         <tr>
           <th>{$lang.mail} {counter}:</th>
-          <td><input type="text" class="input" name="entry[mail][]" value="{$mail}"></td>
+          <td><input type="text" class="input" name="entry[mail][]" value="{$mail}" /></td>
         </tr>
         {/foreach}
         <tr>
           <th>{$lang.mail} {counter}:</th>
-          <td><input type="text" class="input" name="entry[mail][]" value=""></td>
+          <td><input type="text" class="input" name="entry[mail][]" value="" /></td>
         </tr>
         <tr>
           <th>{$lang.mail} {counter}:</th>
-          <td><input type="text" class="input" name="entry[mail][]" value=""></td>
+          <td><input type="text" class="input" name="entry[mail][]" value="" /></td>
         </tr>
 {/if}
 {if $fields.instantmessenger}
         <tr>
           <td align="right" valign="top">{$lang.instantmessenger}:</td>
-          <td><input type="text" class="input" name="entry[instantmessenger]" value="{$entry.instantmessenger|h}"></td>
+          <td><input type="text" class="input" name="entry[instantmessenger]" value="{$entry.instantmessenger|h}" /></td>
         </tr>
 {/if}
 {if $fields.ipphone}
         <tr>
           <td align="right" valign="top">{$lang.ipphone}:</td>
-          <td><input type="text" class="input" name="entry[ipphone]" value="{$entry.ipphone|h}"></td>
+          <td><input type="text" class="input" name="entry[ipphone]" value="{$entry.ipphone|h}" /></td>
         </tr>
 {/if}
 
 {if $fields.note}
         <tr>
           <td align="right" valign="top">{$lang.note}:</td>
-          <td align="right"><textarea class="input" rows="6" cols="30" name="entry[note]" class="note">{$entry.note|h}</textarea></td>
+          <td align="right"><textarea rows="6" cols="30" name="entry[note]" class="input note">{$entry.note|h}</textarea></td>
         </tr>
 {/if}
 
           <td align="right" valign="top">{$lang.certificate}:</td>
           <td>
             <textarea name="entry[certificate]" class="input" rows="6" cols="28" onClick="this.form.elements['entry[certificate]'].select();">{$entry.certificate|h}</textarea>
-            <br /><input type="button" name="clearCert" value="Clear" onClick="if (confirm('Are you sure?')) this.form.elements['entry[certificate]'].value='';">
+            <br /><input type="button" name="clearCert" value="Clear" onclick="if (confirm('Are you sure?')) this.form.elements['entry[certificate]'].value='';" />
           </td>
         </tr>
 {/if}
 {if $fields.domain}
         <tr>
           <td align="right" valign="top">{$lang.domain}:</td>
-          <td><input type="text" class="input" name="entry[domain]" value="{$entry.domain|h}"></td>
+          <td><input type="text" class="input" name="entry[domain]" value="{$entry.domain|h}" /></td>
         </tr>
 {/if}
 {if $fields.timezone}
         <tr>
           <td align="right" valign="top">{$lang.timezone}:</td>
           <td>
-            <input type="text" class="inputbr" name="entry[timezone]" value="{$entry.timezone|h}"><br />
+            <input type="text" class="inputbr" name="entry[timezone]" value="{$entry.timezone|h}" /><br />
           </td>
         </tr>
 {/if}
     <td colspan="2" align="center">
       {$lang.msg_addto}<br />
       <table><tr><td>
-      <input type="radio" name="type" value="public" id="typepublic" class="radio" checked="checked">
-      <label for="typepublic"><img src="pix/public.png" border="0" width="16" height="16" align="middle">{$lang.publicbook}</label><br />
-      <input type="radio" name="type" value="private" id="typeprivate" class="radio">
-      <label for="typeprivate"><img src="pix/private.png" border="0" width="16" height="16" align="middle">{$lang.privatebook}</label>
+      <input type="radio" name="type" value="public" id="typepublic" class="radio" checked="checked" />
+      <label for="typepublic"><img src="pix/public.png" border="0" width="16" height="16" align="middle" />{$lang.publicbook}</label><br />
+      <input type="radio" name="type" value="private" id="typeprivate" class="radio" />
+      <label for="typeprivate"><img src="pix/private.png" border="0" width="16" height="16" align="middle" />{$lang.privatebook}</label>
       </td></tr></table>
     </td>
   </tr>
   {/if}
 
   <tr>
-    <td colspan="2" align="center"><br /><input type="submit" class="button" value="{$lang.submit}"></td>
+    <td colspan="2" align="center"><br /><input type="submit" class="button" value="{$lang.submit}" /></td>
   </tr>
 </table>
 
index 04e6038458b17508875848a7c6b67a33e65e6896..5fb83e0bffa53963e31105bd7f2bf7eea63fed2d 100644 (file)
@@ -5,11 +5,11 @@
     gmap_data = [
         {ldelim}
             adr: '{$entry.street|escape:javascript}, {$entry.zip|escape:javascript} {$entry.location|escape:javascript}',
-            info: '<h4>{$lang.business|escape:javascript}</h4>{$entry.street|escape:javascript}<br />{$entry.zip|escape:javascript} {$entry.location|escape:javascript}'
+            info: '\x3ch4\x3e{$lang.business|escape:javascript}\x3c/h4\x3e{$entry.street|escape:javascript}\x3cbr /\x3e{$entry.zip|escape:javascript} {$entry.location|escape:javascript}'
         {rdelim},
         {ldelim}
             adr: '{$entry.homestreet|replace:"\n":", "|escape:javascript}',
-            info: '<h4>{$lang.private|escape:javascript}</h4>{$entry.homestreet|replace:"\n":"<br />"|escape:javascript}'
+            info: '\x3ch4\x3c{$lang.private|escape:javascript}\x3c/h4\x3e{$entry.homestreet|replace:"\n":"\x3cbr /\x3e"|escape:javascript}'
         {rdelim}
     ];
 </script>
index a626377e66abd020e461544a1ecdf0817d354f80..18cc419847da23b7ed9767c9396e884ad9e342cc 100644 (file)
@@ -5,7 +5,7 @@
 {if $entry.photo != ''}
     <a href="img.php?dn={$entry.dn|escape:url}&amp;.jpg" rel="imagebox"
        title="{$entry.givenname|h} {$entry.name|h}"><img src="img.php?dn={$entry.dn|escape:url}"
-       align="right" class="photo" width="130" /></a>
+       align="right" class="photo" width="130" alt="" /></a>
 {/if}
 <h1>
     <img src="pix/{$entry.type|h}.png" border="0" width="22" height="22"
@@ -41,7 +41,7 @@
 {if $entry.country}
               {$entry.country|h}
 {/if}
-              </br /><br />
+              <br /><br />
             </td>
           </tr>
 {if $entry.phone}
index 65729b02e6fa28f7edd0507f5654a364c6b98b63..847e8631aba27cd4624c1fbe52822c8a30c40567 100644 (file)
@@ -20,7 +20,7 @@
         {if $entry.photo}
             <a href="img.php?dn={$entry.dn|escape:url}&amp;.jpg" rel="imagebox" target="_blank"
                title="{$entry.givenname|escape} {$entry.name|escape}"><img src="pix/image.png"
-               border="0" width="16" height="16" align="middle" alt="{$lang.photo|h}"></a>
+               border="0" width="16" height="16" align="middle" alt="{$lang.photo|h}" /></a>
         {else}
             &nbsp;
         {/if}
index 5557416af583300bfcc0c87e46dd4b74b14fcdbd..33975836d454d04c552c34db96ab8698b89fb1b1 100644 (file)
@@ -1,7 +1,7 @@
 
 {ldelim}
     adr: '{$entry.street|escape:javascript}, {$entry.zip|escape:javascript} {$entry.location|escape:javascript}',
-    info: '<h4>{$entry.organization|escape:javascript}</h4>{$entry.street|escape:javascript}<br />{$entry.zip|escape:javascript} {$entry.location|escape:javascript}'
+    info: '\x3ch4\x3e{$entry.organization|escape:javascript}\x3c/h4\x3e{$entry.street|escape:javascript}\x3cbr /\x3e{$entry.zip|escape:javascript} {$entry.location|escape:javascript}'
 {rdelim},
 
 
index ba6bfb57280436b95f0ccce970e8c0b1443ae0b3..eaf005eeb60a376531d1de24a30b39fe42af3ceb 100644 (file)
@@ -4,10 +4,10 @@
 {foreach from=$orgs item=org}
     <tr>
         <td class="result" width="20">
-            <img src="pix/cog.png" border="0" width="16" height="16" align="middle" />
+            <img src="pix/cog.png" border="0" width="16" height="16" align="middle" alt="" />
         </td>
         <td class="result">
-            <a href="index.php?org={$org|escape:url}">{$org|h}</a><br>
+            <a href="index.php?org={$org|escape:url}">{$org|h}</a><br />
         </td>
     </tr>
 {foreachelse}