From b6d9c47481bfcae3eddb0b13206c9a518bdb92a4 Mon Sep 17 00:00:00 2001
From: Andreas Gohr
Date: Mon, 25 Jun 2007 13:21:43 +0200
Subject: [PATCH] HTML validity fixes
darcs-hash:20070625112143-6e07b-e02dd73d250161681e04305364b67b473840f3a1.gz
---
inc/init.php | 1 +
inc/smarty/plugins/modifier.noteparser.php | 2 +-
templates/entry_edit.tpl | 80 +++++++++++-----------
templates/entry_map.tpl | 4 +-
templates/entry_show.tpl | 4 +-
templates/list_entry.tpl | 2 +-
templates/list_map_entry.tpl | 2 +-
templates/orgs.tpl | 4 +-
8 files changed, 50 insertions(+), 49 deletions(-)
diff --git a/inc/init.php b/inc/init.php
index 6d16606..c6097b2 100644
--- a/inc/init.php
+++ b/inc/init.php
@@ -10,6 +10,7 @@
define('NL',"\n");
//init session
+ @ini_set('arg_separator.output', '&');
session_name("ldapab");
session_start();
diff --git a/inc/smarty/plugins/modifier.noteparser.php b/inc/smarty/plugins/modifier.noteparser.php
index 0f96f00..10b145a 100644
--- a/inc/smarty/plugins/modifier.noteparser.php
+++ b/inc/smarty/plugins/modifier.noteparser.php
@@ -36,7 +36,7 @@ function smarty_modifier_noteparser($string){
$string = preg_replace('!\n\n+!','
',$string);
$string = nl2br($string);
- return '
'.$string.'
';
+ return ''.$string.'
';
}
/* vim: set expandtab: */
diff --git a/templates/entry_edit.tpl b/templates/entry_edit.tpl
index bfaad4d..62b43d2 100644
--- a/templates/entry_edit.tpl
+++ b/templates/entry_edit.tpl
@@ -4,7 +4,7 @@
{if $entry.type != ''}
-
+
{/if}
{$entry.givenname|h} {$entry.name|h}
@@ -22,19 +22,19 @@
{* always required ... if $fields.name *}
{$lang.name}: |
- |
+ |
{* /if *}
{if $fields.givenname}
{$lang.givenname}: |
- |
+ |
{/if}
{if $fields.title}
{$lang.title}: |
- |
+ |
{/if}
@@ -58,70 +58,70 @@
{$lang.organization}: |
-
+
|
{/if}
{if $fields.office}
{$lang.office}: |
- |
+ |
{/if}
{if $fields.street}
{$lang.street}: |
- |
+ |
{/if}
{if $fields.zip}
{$lang.zip}: |
- |
+ |
{/if}
{if $fields.location}
{$lang.location}: |
- |
+ |
{/if}
{if $fields.state}
{$lang.state}: |
- |
+ |
{/if}
{if $fields.country}
{$lang.country}: |
-
+
|
{/if}
{if $fields.phone}
{$lang.phone}: |
- |
+ |
{/if}
{if $fields.switchboard}
{$lang.switchboard}: |
- |
+ |
{/if}
{if $fields.fax}
{$lang.fax}: |
- |
+ |
{/if}
{if $fields.pager}
{$lang.pager}: |
- |
+ |
{/if}
{if $fields.manager}
@@ -138,13 +138,13 @@
{if $fields.position}
{$lang.position}: |
- |
+ |
{/if}
{if $fields.department}
{$lang.department}: |
- |
+ |
{/if}
@@ -155,7 +155,7 @@
- {$lang.private}
+ | {$lang.private} |
{if $fields.homestreet}
@@ -166,43 +166,43 @@
{if $fields.homephone}
{$lang.homephone}: |
- |
+ |
{/if}
{if $fields.mobile}
{$lang.mobile}: |
- |
+ |
{/if}
{if $fields.photo}
{$lang.photo}: ({$lang.msg_jpegonly}) |
{if $entry.photo}
-
+
{/if}
-
+
|
{/if}
{if $fields.birthday}
{$lang.birthday}: ({$lang.msg_dateformat}) |
- |
+ |
{/if}
{if $fields.anniversary}
{$lang.anniversary}: ({$lang.msg_dateformat}) |
- |
+ |
{/if}
{if $fields.spouse}
{$lang.spouse}: |
- |
+ |
{/if}
@@ -212,35 +212,35 @@
{if $fields.url}
{$lang.url}: |
- |
+ |
{/if}
{if $fields._mail}
{foreach from=$entry.mail|smarty:nodefaults item=mail}
{$lang.mail} {counter}: |
- |
+ |
{/foreach}
{$lang.mail} {counter}: |
- |
+ |
{$lang.mail} {counter}: |
- |
+ |
{/if}
{if $fields.instantmessenger}
{$lang.instantmessenger}: |
- |
+ |
{/if}
{if $fields.ipphone}
{$lang.ipphone}: |
- |
+ |
{/if}
@@ -262,7 +262,7 @@
{if $fields.note}
{$lang.note}: |
- |
+ |
{/if}
@@ -283,21 +283,21 @@
{$lang.certificate}: |
-
+
|
{/if}
{if $fields.domain}
{$lang.domain}: |
- |
+ |
{/if}
{if $fields.timezone}
{$lang.timezone}: |
-
+
|
{/if}
@@ -310,17 +310,17 @@
{$lang.msg_addto}
|
{/if}
-
|
+
|
diff --git a/templates/entry_map.tpl b/templates/entry_map.tpl
index 04e6038..5fb83e0 100644
--- a/templates/entry_map.tpl
+++ b/templates/entry_map.tpl
@@ -5,11 +5,11 @@
gmap_data = [
{ldelim}
adr: '{$entry.street|escape:javascript}, {$entry.zip|escape:javascript} {$entry.location|escape:javascript}',
- info: '{$lang.business|escape:javascript}
{$entry.street|escape:javascript}
{$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: '{$lang.private|escape:javascript}
{$entry.homestreet|replace:"\n":"
"|escape:javascript}'
+ info: '\x3ch4\x3c{$lang.private|escape:javascript}\x3c/h4\x3e{$entry.homestreet|replace:"\n":"\x3cbr /\x3e"|escape:javascript}'
{rdelim}
];
diff --git a/templates/entry_show.tpl b/templates/entry_show.tpl
index a626377..18cc419 100644
--- a/templates/entry_show.tpl
+++ b/templates/entry_show.tpl
@@ -5,7 +5,7 @@
{if $entry.photo != ''}
+ align="right" class="photo" width="130" alt="" />
{/if}
+
{if $entry.phone}
diff --git a/templates/list_entry.tpl b/templates/list_entry.tpl
index 65729b0..847e863 100644
--- a/templates/list_entry.tpl
+++ b/templates/list_entry.tpl
@@ -20,7 +20,7 @@
{if $entry.photo}
+ border="0" width="16" height="16" align="middle" alt="{$lang.photo|h}" />
{else}
{/if}
diff --git a/templates/list_map_entry.tpl b/templates/list_map_entry.tpl
index 5557416..3397583 100644
--- a/templates/list_map_entry.tpl
+++ b/templates/list_map_entry.tpl
@@ -1,7 +1,7 @@
{ldelim}
adr: '{$entry.street|escape:javascript}, {$entry.zip|escape:javascript} {$entry.location|escape:javascript}',
- info: '{$entry.organization|escape:javascript}
{$entry.street|escape:javascript}
{$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},
diff --git a/templates/orgs.tpl b/templates/orgs.tpl
index ba6bfb5..eaf005e 100644
--- a/templates/orgs.tpl
+++ b/templates/orgs.tpl
@@ -4,10 +4,10 @@
{foreach from=$orgs item=org}
-
+
|
- {$org|h}
+ {$org|h}
|
{foreachelse}
--
2.39.5