Index: /trunk/themes/default/template/index.tpl
===================================================================
--- /trunk/themes/default/template/index.tpl	(revision 8773)
+++ /trunk/themes/default/template/index.tpl	(revision 8774)
@@ -4,7 +4,6 @@
 <div class="titrePage">
 	<ul class="categoryActions">
-		{if !empty($image_orders)}
-		<li>
-		{'Sort order'|@translate}:
+{if !empty($image_orders)}
+		<li>{'Sort order'|@translate}: {strip}
 		<select onchange="document.location = this.options[this.selectedIndex].value;">
 			{foreach from=$image_orders item=image_order}
@@ -12,20 +11,19 @@
 			{/foreach}
 		</select>
-		</li>
-		{/if}
-
+{/strip}</li>
+{/if}
 {if isset($favorite)}
 		<li><a href="{$favorite.U_FAVORITE}" title="{'delete all photos from your favorites'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
-			<span class="pwg-icon pwg-icon-favorite-del">&nbsp;</span><span class="pwg-button-text">{'delete all photos from your favorites'|@translate}</span>
+			<span class="pwg-icon pwg-icon-favorite-del"> </span><span class="pwg-button-text">{'delete all photos from your favorites'|@translate}</span>
 		</a></li>
 {/if}
 {if isset($U_CADDIE)}
 		<li><a href="{$U_CADDIE}" title="{'add to caddie'|@translate}" class="pwg-state-default pwg-button">
-			<span class="pwg-icon pwg-icon-caddie-add">&nbsp;</span><span class="pwg-button-text">{'caddie'|@translate}</span>
+			<span class="pwg-icon pwg-icon-caddie-add"> </span><span class="pwg-button-text">{'caddie'|@translate}</span>
 		</a></li>
 {/if}
 {if isset($U_EDIT)}
 		<li><a href="{$U_EDIT}" title="{'edit'|@translate}" class="pwg-state-default pwg-button">
-			<span class="pwg-icon pwg-icon-category-edit">&nbsp;</span><span class="pwg-button-text">{'edit'|@translate}</span>
+			<span class="pwg-icon pwg-icon-category-edit"> </span><span class="pwg-button-text">{'edit'|@translate}</span>
 		</a></li>
 {/if}
@@ -33,31 +31,31 @@
 		{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'}
 		<li><a href="{$U_SEARCH_RULES}" onclick="popuphelp(this.href); return false;" title="{'Search rules'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
-			<span class="pwg-icon pwg-icon-help">&nbsp;</span><span class="pwg-button-text">(?)</span>
+			<span class="pwg-icon pwg-icon-help"> </span><span class="pwg-button-text">(?)</span>
 		</a></li>
 {/if}
 {if isset($U_SLIDESHOW)}
-		<li><a href="{$U_SLIDESHOW}" title="{'slideshow'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
-			<span class="pwg-icon pwg-icon-slideshow">&nbsp;</span><span class="pwg-button-text">{'slideshow'|@translate}</span>
-		</a></li>
+		<li>{strip}<a href="{$U_SLIDESHOW}" title="{'slideshow'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
+			<span class="pwg-icon pwg-icon-slideshow"> </span><span class="pwg-button-text">{'slideshow'|@translate}</span>
+		</a>{/strip}</li>
 {/if}
 {if isset($U_MODE_FLAT)}
-		<li><a href="{$U_MODE_FLAT}" title="{'display all photos in all sub-albums'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
-			<span class="pwg-icon pwg-icon-category-view-flat">&nbsp;</span><span class="pwg-button-text">{'display all photos in all sub-albums'|@translate}</span>
-		</a></li>
+		<li>{strip}<a href="{$U_MODE_FLAT}" title="{'display all photos in all sub-albums'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
+			<span class="pwg-icon pwg-icon-category-view-flat"> </span><span class="pwg-button-text">{'display all photos in all sub-albums'|@translate}</span>
+		</a>{/strip}</li>
 {/if}
 {if isset($U_MODE_NORMAL)}
-		<li><a href="{$U_MODE_NORMAL}" title="{'return to normal view mode'|@translate}" class="pwg-state-default pwg-button">
-			<span class="pwg-icon pwg-icon-category-view-normal">&nbsp;</span><span class="pwg-button-text">{'return to normal view mode'|@translate}</span>
-		</a></li>
+		<li>{strip}<a href="{$U_MODE_NORMAL}" title="{'return to normal view mode'|@translate}" class="pwg-state-default pwg-button">
+			<span class="pwg-icon pwg-icon-category-view-normal"> </span><span class="pwg-button-text">{'return to normal view mode'|@translate}</span>
+		</a>{/strip}</li>
 {/if}
 {if isset($U_MODE_POSTED)}
-		<li><a href="{$U_MODE_POSTED}" title="{'display a calendar by posted date'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
-			<span class="pwg-icon pwg-icon-camera-calendar">&nbsp;</span><span class="pwg-button-text">{'Calendar'|@translate}</span>
-		</a></li>
+		<li>{strip}<a href="{$U_MODE_POSTED}" title="{'display a calendar by posted date'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
+			<span class="pwg-icon pwg-icon-camera-calendar"> </span><span class="pwg-button-text">{'Calendar'|@translate}</span>
+		</a>{/strip}</li>
 {/if}
 {if isset($U_MODE_CREATED)}
-		<li><a href="{$U_MODE_CREATED}" title="{'display a calendar by creation date'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
-			<span class="pwg-icon pwg-icon-camera-calendar">&nbsp;</span><span class="pwg-button-text">{'Calendar'|@translate}</span>
-		</a></li>
+		<li>{strip}<a href="{$U_MODE_CREATED}" title="{'display a calendar by creation date'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
+			<span class="pwg-icon pwg-icon-camera-calendar"> </span><span class="pwg-button-text">{'Calendar'|@translate}</span>
+		</a>{/strip}</li>
 {/if}
 {if !empty($PLUGIN_INDEX_ACTIONS)}{$PLUGIN_INDEX_ACTIONS}{/if}
@@ -80,5 +78,5 @@
 {/if}
 
-</div><!-- titrePage -->
+</div>{* <!-- titrePage --> *}
 
 {if !empty($PLUGIN_INDEX_CONTENT_BEGIN)}{$PLUGIN_INDEX_CONTENT_BEGIN}{/if}
@@ -126,4 +124,4 @@
 
 {if !empty($PLUGIN_INDEX_CONTENT_END)}{$PLUGIN_INDEX_CONTENT_END}{/if}
-</div><!-- content -->
+</div>{* <!-- content --> *}
 {if !empty($PLUGIN_INDEX_CONTENT_AFTER)}{$PLUGIN_INDEX_CONTENT_AFTER}{/if}
Index: /trunk/themes/default/template/menubar_identification.tpl
===================================================================
--- /trunk/themes/default/template/menubar_identification.tpl	(revision 8773)
+++ /trunk/themes/default/template/menubar_identification.tpl	(revision 8774)
@@ -1,31 +1,28 @@
 <dt>{'Identification'|@translate}</dt>
 <dd>
+{strip}
 	{if isset($USERNAME)}
-	<p>{'Hello'|@translate}&nbsp;{$USERNAME}&nbsp;!</p>
+	<p>{'Hello'|@translate} {$USERNAME} !</p>
 	{/if}
-
 	<ul>
 	{if isset($U_REGISTER)}
 	<li><a href="{$U_REGISTER}" title="{'Create a new account'|@translate}" rel="nofollow">{'Register'|@translate}</a></li>
 	{/if}
-
 	{if isset($U_LOGIN)}
 	<li><a href="{$U_LOGIN}" rel="nofollow">{'Login'|@translate}</a></li>
 	{/if}
-
 	{if isset($U_LOGOUT)}
 	<li><a href="{$U_LOGOUT}">{'Logout'|@translate}</a></li>
 	{/if}
-
 	{if isset($U_PROFILE)}
 	<li><a href="{$U_PROFILE}" title="{'customize the appareance of the gallery'|@translate}">{'Customize'|@translate}</a></li>
 	{/if}
-
 	{if isset($U_ADMIN)}
 	<li><a href="{$U_ADMIN}" title="{'available for administrators only'|@translate}">{'Administration'|@translate}</a></li>
 	{/if}
 	</ul>
-
+{/strip}
 	{if isset($U_LOGIN)}
+{strip}
 	<form method="post" action="{$U_LOGIN}" id="quickconnect">
 	<fieldset>
@@ -36,6 +33,5 @@
 	</div>
 
-	<div><label for="password">{'Password'|@translate}</label>
-	<br>
+	<div><label for="password">{'Password'|@translate}</label><br>
 	<input type="password" name="password" id="password" style="width:99%">
 	</div>
@@ -43,6 +39,5 @@
 	{if $AUTHORIZE_REMEMBERING}
 	<div><label for="remember_me">
-	{'Auto login'|@translate}
-	<input type="checkbox" name="remember_me" id="remember_me" value="1">
+	{'Auto login'|@translate} <input type="checkbox" name="remember_me" id="remember_me" value="1">
 	</label></div>
 	{/if}
@@ -50,13 +45,13 @@
 	<div>
 	<input type="hidden" name="redirect" value="{$smarty.server.REQUEST_URI|@urlencode}">
-	<input class="submit" type="submit" name="login" value="{'Submit'|@translate}">
+	<input type="submit" name="login" value="{'Submit'|@translate}">
 	<span class="categoryActions">
 {if isset($U_REGISTER)}
 		<a href="{$U_REGISTER}" title="{'Create a new account'|@translate}" class="pwg-state-default pwg-button">
-			<span class="pwg-icon pwg-icon-register">&nbsp;</span>
+			<span class="pwg-icon pwg-icon-register"> </span>
 		</a>
 {/if}
 		<a href="{$U_LOST_PASSWORD}" title="{'Forgot your password?'|@translate}" class="pwg-state-default pwg-button">
-			<span class="pwg-icon pwg-icon-lost-password">&nbsp;</span>
+			<span class="pwg-icon pwg-icon-lost-password"> </span>
 		</a>
 	</span>
@@ -65,5 +60,5 @@
 	</fieldset>
 	</form>
+{/strip}
 	{/if}
 </dd>
-
Index: /trunk/themes/default/template/menubar_links.tpl
===================================================================
--- /trunk/themes/default/template/menubar_links.tpl	(revision 8773)
+++ /trunk/themes/default/template/menubar_links.tpl	(revision 8774)
@@ -1,15 +1,12 @@
 <dt>{'Links'|@translate}</dt>
 <dd>
-	<ul>
+	<ul>{strip}
 		{foreach from=$block->data item=link}
 			<li>
-				<a href="{$link.URL}" class="external" 
-					{if isset($link.new_window) } onclick="window.open(this.href, '{$link.new_window.NAME}','{$link.new_window.FEATURES}'); return false;"{/if}
-				>
+				<a href="{$link.URL}" class="external"{if isset($link.new_window)} onclick="window.open(this.href, '{$link.new_window.NAME}','{$link.new_window.FEATURES}'); return false;"{/if}>
 				{$link.LABEL}
 				</a>
 			</li>
 		{/foreach}
-	</ul>
+	{/strip}</ul>
 </dd>
-
Index: /trunk/themes/default/template/menubar_menu.tpl
===================================================================
--- /trunk/themes/default/template/menubar_menu.tpl	(revision 8773)
+++ /trunk/themes/default/template/menubar_menu.tpl	(revision 8774)
@@ -1,20 +1,18 @@
 <dt>{'Menu'|@translate}</dt>
 <dd>
-  {if isset($block->data.qsearch) and  $block->data.qsearch==true}
-    <form action="{$ROOT_URL}qsearch.php" method="get" id="quicksearch" onsubmit="return this.q.value!='' && this.q.value!=qsearch_prompt;">
-      <p style="margin:0;padding:0"{*this <p> is for html validation only - does not affect positioning*}>
-        <input type="text" name="q" id="qsearchInput" onfocus="if (value==qsearch_prompt) value='';" onblur="if (value=='') value=qsearch_prompt;" style="width:90%">
-      </p>
-    </form>
-    <script type="text/javascript">var qsearch_prompt="{'Quick search'|@translate|@escape:'javascript'}"; document.getElementById('qsearchInput').value=qsearch_prompt;</script>
-  {/if}
-
-	<ul>
+{if isset($block->data.qsearch) and  $block->data.qsearch==true}
+	<form action="{$ROOT_URL}qsearch.php" method="get" id="quicksearch" onsubmit="return this.q.value!='' && this.q.value!=qsearch_prompt;">
+		<p style="margin:0;padding:0"{*this <p> is for html validation only - does not affect positioning*}>
+			<input type="text" name="q" id="qsearchInput" onfocus="if (value==qsearch_prompt) value='';" onblur="if (value=='') value=qsearch_prompt;" style="width:90%">
+		</p>
+	</form>
+	<script type="text/javascript">var qsearch_prompt="{'Quick search'|@translate|@escape:'javascript'}"; document.getElementById('qsearchInput').value=qsearch_prompt;</script>
+{/if}
+	<ul>{strip}
 	{foreach from=$block->data item=link}
 		{if is_array($link)}
-			<li><a href="{$link.URL}" title="{$link.TITLE}" {if isset($link.REL)}{$link.REL}{/if}>{$link.NAME}</a></li>
+			<li><a href="{$link.URL}" title="{$link.TITLE}"{if isset($link.REL)} {$link.REL}{/if}>{$link.NAME}</a></li>
 		{/if}
 	{/foreach}
-	</ul>
+	{/strip}</ul>
 </dd>
-
Index: /trunk/themes/default/template/menubar_specials.tpl
===================================================================
--- /trunk/themes/default/template/menubar_specials.tpl	(revision 8773)
+++ /trunk/themes/default/template/menubar_specials.tpl	(revision 8774)
@@ -1,9 +1,8 @@
 <dt>{'Specials'|@translate}</dt>
 <dd>
-	<ul>
+	<ul>{strip}
 		{foreach from=$block->data item=link}
-		<li><a href="{$link.URL}" title="{$link.TITLE}" {if isset($link.REL)}{$link.REL}{/if}>{$link.NAME}</a></li>
+		<li><a href="{$link.URL}" title="{$link.TITLE}"{if isset($link.REL)} {$link.REL}{/if}>{$link.NAME}</a></li>
 		{/foreach}
-	</ul>
+	{/strip}</ul>
 </dd>
-
Index: /trunk/themes/default/template/menubar_tags.tpl
===================================================================
--- /trunk/themes/default/template/menubar_tags.tpl	(revision 8773)
+++ /trunk/themes/default/template/menubar_tags.tpl	(revision 8774)
@@ -3,15 +3,12 @@
 	<div id="menuTagCloud">
 		{foreach from=$block->data item=tag}
-		<span>
-			<a class="tagLevel{$tag.level}"
+		<span>{strip}
+			<a class="tagLevel{$tag.level}" href=
 			{if isset($tag.U_ADD)}
-				href="{$tag.U_ADD}"
-				title="{$pwg->l10n_dec('%d photo is also linked to current tags', '%d photos are also linked to current tags', $tag.counter)}"
-				rel="nofollow">+
+				"{$tag.U_ADD}" title="{$pwg->l10n_dec('%d photo is also linked to current tags', '%d photos are also linked to current tags', $tag.counter)}" rel="nofollow">+
 			{else}
-				href="{$tag.URL}"
-				title="{'display photos linked to this tag'|@translate}">
+				"{$tag.URL}" title="{'display photos linked to this tag'|@translate}">
 			{/if}
-				{$tag.name}</a></span>
+				{$tag.name}</a></span>{/strip}
 {* ABOVE there should be no space between text, </a> and </span> elements to avoid IE8 bug https://connect.microsoft.com/IE/feedback/ViewFeedback.aspx?FeedbackID=366567 *}
 		{/foreach}
Index: /trunk/themes/default/template/picture.tpl
===================================================================
--- /trunk/themes/default/template/picture.tpl	(revision 8773)
+++ /trunk/themes/default/template/picture.tpl	(revision 8774)
@@ -38,15 +38,15 @@
 {strip}{if isset($U_SLIDESHOW_START)}
 	<a href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
-		<span class="pwg-icon pwg-icon-slideshow">&nbsp;</span><span class="pwg-button-text">{'slideshow'|@translate}</span>
+		<span class="pwg-icon pwg-icon-slideshow"> </span><span class="pwg-button-text">{'slideshow'|@translate}</span>
 	</a>
 {/if}{/strip}
 {strip}{if isset($U_METADATA)}
 	<a href="{$U_METADATA}" title="{'Show file metadata'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
-		<span class="pwg-icon pwg-icon-camera-info">&nbsp;</span><span class="pwg-button-text">{'Show file metadata'|@translate}</span>
+		<span class="pwg-icon pwg-icon-camera-info"> </span><span class="pwg-button-text">{'Show file metadata'|@translate}</span>
 	</a>
 {/if}{/strip}
 {strip}{if isset($current.U_DOWNLOAD)}
 	<a href="{$current.U_DOWNLOAD}" title="{'download this file'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
-		<span class="pwg-icon pwg-icon-save">&nbsp;</span><span class="pwg-button-text">{'download'|@translate}</span>
+		<span class="pwg-icon pwg-icon-save"> </span><span class="pwg-button-text">{'download'|@translate}</span>
 	</a>
 {/if}{/strip}
@@ -54,15 +54,15 @@
 {strip}{if isset($favorite)}
 	<a href="{$favorite.U_FAVORITE}" title="{if $favorite.IS_FAVORITE}{'delete this photo from your favorites'|@translate}{else}{'add this photo to your favorites'|@translate}{/if}" class="pwg-state-default pwg-button" rel="nofollow">
-		<span class="pwg-icon pwg-icon-favorite-{if $favorite.IS_FAVORITE}del{else}add{/if}">&nbsp;</span><span class="pwg-button-text">{'Favorites'|@translate}</span>
+		<span class="pwg-icon pwg-icon-favorite-{if $favorite.IS_FAVORITE}del{else}add{/if}"> </span><span class="pwg-button-text">{'Favorites'|@translate}</span>
 	</a>
 {/if}{/strip}
 {strip}{if isset($U_SET_AS_REPRESENTATIVE)}
 	<a href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as album representative'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
-		<span class="pwg-icon pwg-icon-representative">&nbsp;</span><span class="pwg-button-text">{'representative'|@translate}</span>
+		<span class="pwg-icon pwg-icon-representative"> </span><span class="pwg-button-text">{'representative'|@translate}</span>
 	</a>
 {/if}{/strip}
 {strip}{if isset($U_ADMIN)}
 	<a href="{$U_ADMIN}" title="{'Modify information'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
-		<span class="pwg-icon pwg-icon-edit">&nbsp;</span><span class="pwg-button-text">{'edit'|@translate}</span>
+		<span class="pwg-icon pwg-icon-edit"> </span><span class="pwg-button-text">{'edit'|@translate}</span>
 	</a>
 {/if}{/strip}
@@ -84,5 +84,5 @@
 {/footer_script}
 	<a href="{$U_CADDIE}" onclick="addToCadie(this, '{$ROOT_URL}', {$current.id}); return false;" title="{'add to caddie'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
-		<span class="pwg-icon pwg-icon-caddie-add">&nbsp;</span><span class="pwg-button-text">{'caddie'|@translate}</span>
+		<span class="pwg-icon pwg-icon-caddie-add"> </span><span class="pwg-button-text">{'caddie'|@translate}</span>
 	</a>
 {/if}{/strip}{*caddie management END*}
@@ -301,5 +301,5 @@
 		<label>{'Comment'|@translate}<textarea name="content" id="contentid" rows="5" cols="80">{$comment_add.CONTENT}</textarea></label>
 		<input type="hidden" name="key" value="{$comment_add.KEY}">
-		<input class="submit" type="submit" value="{'Submit'|@translate}">
+		<input type="submit" value="{'Submit'|@translate}">
 	</fieldset>
 	</form>
