diff --git a/inc/shaarli.css b/inc/shaarli.css
index d0614e3..3837c76 100644
--- a/inc/shaarli.css
+++ b/inc/shaarli.css
@@ -177,18 +177,18 @@ cursor:pointer;
 #pageheader a:visited { color:#98C943; text-decoration:none;}
 #pageheader a:hover { color:#FFFFC9; text-decoration:none;}
 #pageheader a:active { color:#bbb; text-decoration:none;}
-#searchcriteria { padding: 4 0 5 5; font-weight:bold;}
+#searchcriteria { padding: 4px 0px 5px 5px; font-weight:bold;}
 .paging { padding:5px;background-color:#777; color:#ccc; text-align:center;  clear:both;}
 .paging a:link { color:#ccc; text-decoration:none;}
 .paging a:visited { color:#ccc;  }
 .paging a:hover {  color:#FFFFC9;  }
 .paging a:active { color:#fff;  }
-#headerform { color:#ffffff; padding:5 5 5 5; clear: both;}
-#toolsdiv { color:#ffffff; padding:5 5 5 5; clear:left; }
-#uploaddiv { color:#ffffff; padding:5 5 5 5; clear:left; }
-#editlinkform { height:100%;color:#ffffff; padding:5 5 5 15px; width:80%; clear:left; }
+#headerform { color:#ffffff; padding:5px 5px 5px 5px; clear: both;}
+#toolsdiv { color:#ffffff; padding:5px 5px 5px 5px; clear:left; }
+#uploaddiv { color:#ffffff; padding:5px 5px 5px 5px; clear:left; }
+#editlinkform { height:100%;color:#ffffff; padding:5px 5px 5px 15px; width:80%; clear:left; }
 #linklist li {
-	padding:4 10 15 20; border-top: 1px solid #bbb; clear:both;
+	padding:4px 10px 15px 20px; border-top: 1px solid #bbb; clear:both;
 	background: -webkit-gradient(linear, 0 0, 0 bottom, from(#F2F2F2), to(#ffffff));
 	background: -webkit-linear-gradient(#F2F2F2, #ffffff);
 	background: -moz-linear-gradient(#F2F2F2, #ffffff);
@@ -247,11 +247,11 @@ font-size:9pt;
 #newversion { background-color: #FFFFA0; color:#000; position:absolute; top:0;right:0; padding:2 7 2 7;  font-size:9pt;}
 #cloudtag  { padding-left:10%; padding-right:10%; }
 #cloudtag a { color:black; text-decoration:none; }
-#installform td  { font-size: 10pt; padding:10 5 10 5; clear:left; }
-#changepasswordform { color:#ccc; padding:10 5 10 5; clear:left; }
-#changetag { color:#ccc; padding:10 5 10 5; clear:left; }
-#configform td  { color:#ccc; font-size: 10pt; padding:10 5 10 5;  }
-#configform  { color:#ccc; padding:10 5 10 5; clear:left; }
+#installform td  { font-size: 10pt; padding:10px 5px 10px 5px; clear:left; }
+#changepasswordform { color:#ccc; padding:10px 5px 10px 5px; clear:left; }
+#changetag { color:#ccc; padding:10px 5px 10px 5px; clear:left; }
+#configform td  { color:#ccc; font-size: 10pt; padding:10px 5px 10px 5px;  }
+#configform  { color:#ccc; padding:10px 5px 10px 5px; clear:left; }
 .thumbnail { float:right;  margin-left: 10px; }
 /* If you want thumbnails on the left:
 .thumbnail { float:left;  margin-right: 10px;   }
diff --git a/index.php b/index.php
index c8e739a..60cc748 100644
--- a/index.php
+++ b/index.php
@@ -520,7 +520,7 @@ class pageBuilder
         elseif (!empty($_GET['searchterm'])) $searchcrits.='&searchterm='.$_GET['searchterm'];
         $this->tpl->assign('searchcrits',$searchcrits);
         $this->tpl->assign('source',indexUrl());
-        $this->tpl->assign('version',shaarli_version);
+        $this->tpl->assign('version',urlencode(shaarli_version));
         $this->tpl->assign('pagetitle','Shaarli');
         if (!empty($GLOBALS['title'])) $this->tpl->assign('pagetitle',$GLOBALS['title']);
         if (!empty($GLOBALS['pagetitle'])) $this->tpl->assign('pagetitle',$GLOBALS['pagetitle']);
@@ -1432,32 +1432,32 @@ function thumbnail($url,$href=false)
     if ($domain=='youtube.com' || $domain=='www.youtube.com')
     {
         parse_str(parse_url($url,PHP_URL_QUERY), $params); // Extract video ID and get thumbnail
-        if (!empty($params['v'])) return '<a href="'.htmlspecialchars($href).'"><img src="http://img.youtube.com/vi/'.htmlspecialchars($params['v']).'/default.jpg" width="120" height="90"></a>';
+        if (!empty($params['v'])) return '<a href="'.htmlspecialchars($href).'"><img src="http://img.youtube.com/vi/'.htmlspecialchars($params['v']).'/default.jpg" width="120" height="90" alt="youtube thumbnail"></a>';
     }
     if ($domain=='youtu.be') // Youtube short links
     {
         $path = parse_url($url,PHP_URL_PATH);
-        return '<a href="'.htmlspecialchars($href).'"><img src="http://img.youtube.com/vi'.htmlspecialchars($path).'/default.jpg" width="120" height="90"></a>';
+        return '<a href="'.htmlspecialchars($href).'"><img src="http://img.youtube.com/vi'.htmlspecialchars($path).'/default.jpg" width="120" height="90" alt="youtube thumbnail"></a>';
     }
     if ($domain=='imgur.com')
     {
         $path = parse_url($url,PHP_URL_PATH);
         if (startsWith($path,'/a/')) return ''; // Thumbnails for albums are not available.
-        if (startsWith($path,'/r/')) return '<a href="'.htmlspecialchars($href).'"><img src="http://i.imgur.com/'.htmlspecialchars(basename($path)).'s.jpg" width="90" height="90"></a>';
-        if (startsWith($path,'/gallery/')) return '<a href="'.htmlspecialchars($href).'"><img src="http://i.imgur.com'.htmlspecialchars(substr($path,8)).'s.jpg" width="90" height="90"></a>';
-        if (substr_count($path,'/')==1) return '<a href="'.htmlspecialchars($href).'"><img src="http://i.imgur.com/'.htmlspecialchars(substr($path,1)).'s.jpg" width="90" height="90"></a>';
+        if (startsWith($path,'/r/')) return '<a href="'.htmlspecialchars($href).'"><img src="http://i.imgur.com/'.htmlspecialchars(basename($path)).'s.jpg" width="90" height="90" alt="imgur.com thumbnail"></a>';
+        if (startsWith($path,'/gallery/')) return '<a href="'.htmlspecialchars($href).'"><img src="http://i.imgur.com'.htmlspecialchars(substr($path,8)).'s.jpg" width="90" height="90" alt="imgur.com thumbnail"></a>';
+        if (substr_count($path,'/')==1) return '<a href="'.htmlspecialchars($href).'"><img src="http://i.imgur.com/'.htmlspecialchars(substr($path,1)).'s.jpg" width="90" height="90" alt="imgur.com thumbnail"></a>';
     }
     if ($domain=='i.imgur.com')
     {
         $pi = pathinfo(parse_url($url,PHP_URL_PATH));
-        if (!empty($pi['filename'])) return '<a href="'.htmlspecialchars($href).'"><img src="http://i.imgur.com/'.htmlspecialchars($pi['filename']).'s.jpg" width="90" height="90"></a>';
+        if (!empty($pi['filename'])) return '<a href="'.htmlspecialchars($href).'"><img src="http://i.imgur.com/'.htmlspecialchars($pi['filename']).'s.jpg" width="90" height="90" alt="imgur.com thumbnail"></a>';
     }
     if ($domain=='dailymotion.com' || $domain=='www.dailymotion.com')
     {
         if (strpos($url,'dailymotion.com/video/')!==false)
         {
             $thumburl=str_replace('dailymotion.com/video/','dailymotion.com/thumbnail/video/',$url);
-            return '<a href="'.htmlspecialchars($href).'"><img src="'.htmlspecialchars($thumburl).'" width="120" style="height:auto;"></a>';
+            return '<a href="'.htmlspecialchars($href).'"><img src="'.htmlspecialchars($thumburl).'" width="120" style="height:auto;" alt="dailymotion thumbnail"></a>';
         }
     }
     if (endsWith($domain,'.imageshack.us'))
@@ -1466,7 +1466,7 @@ function thumbnail($url,$href=false)
         if ($ext=='jpg' || $ext=='jpeg' || $ext=='png' || $ext=='gif')
         {
             $thumburl = substr($url,0,strlen($url)-strlen($ext)).'th.'.$ext;
-            return '<a href="'.htmlspecialchars($href).'"><img src="'.htmlspecialchars($thumburl).'" width="120" style="height:auto;"></a>';
+            return '<a href="'.htmlspecialchars($href).'"><img src="'.htmlspecialchars($thumburl).'" width="120" style="height:auto;" alt="imghack thumbnail></a>';
         }
     }
 
diff --git a/tpl/includes.html b/tpl/includes.html
index c70b44e..bdc39ee 100644
--- a/tpl/includes.html
+++ b/tpl/includes.html
@@ -1,7 +1,8 @@
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <title>{$pagetitle}</title>
 <link rel="alternate" type="application/rss+xml" href="{$feedurl}?do=rss{$searchcrits}#" title="RSS Feed" />
 <link rel="alternate" type="application/atom+xml" href="{$feedurl}?do=atom{$searchcrits}#" title="ATOM Feed" />
 <link href="images/favicon.ico#" rel="shortcut icon" type="image/x-icon" />
 <link type="text/css" rel="stylesheet" href="inc/shaarli.css?version={$version}#" />
 {if condition="is_file('inc/user.css')"}<link type="text/css" rel="stylesheet" href="inc/user.css?version={$version}#" />{/if}
-<script language="JavaScript" src="inc/jquery.min.js#"></script><script language="JavaScript" src="inc/jquery-ui.custom.min.js#"></script>
+<script src="inc/jquery.min.js#"></script><script src="inc/jquery-ui.custom.min.js#"></script>
diff --git a/tpl/linklist.html b/tpl/linklist.html
index c7de5b8..2715c43 100644
--- a/tpl/linklist.html
+++ b/tpl/linklist.html
@@ -1,9 +1,10 @@
+<!DOCTYPE html>
 <html>
 <head>{include="includes"}</head>
 <body>
 <div id="pageheader">
 	{include="page.header"}
-	<div id="headerform" style="width:100%; white-space:nowrap;";>
+	<div id="headerform" style="width:100%; white-space:nowrap;">
 	    <form method="GET" class="searchform" name="searchform" style="display:inline;"><input type="text" name="searchterm" style="width:30%" value=""> <input type="submit" value="Search" class="bigbutton"></form>
 	    <form method="GET" class="tagfilter" name="tagfilter" style="display:inline;margin-left:24px;"><input type="text" name="searchtags" id="searchtags" style="width:10%" value=""> <input type="submit" value="Filter by tag" class="bigbutton"></form>
 	</div>
